fix: use activity context for Toast

Fixes a newly introduced warning in API 33

> Tried to access visual service WindowManager from a non-visual Context:app.passwordstore.Application@d2801f8 WindowManager
> should be accessed from Activity or other visual Context. Use an Activity or a Context created with
> Context#createWindowContext(int, Bundle), which are adjusted to the configuration and visual bounds of an area on screen.
This commit is contained in:
Harsh Shandilya 2023-03-03 23:27:45 +05:30
parent 6bb925871b
commit a3b88c1dee
No known key found for this signature in database

View file

@ -103,7 +103,7 @@ class GitCommandExecutor(
RemoteRefUpdate.Status.UP_TO_DATE -> { RemoteRefUpdate.Status.UP_TO_DATE -> {
withContext(Dispatchers.Main) { withContext(Dispatchers.Main) {
Toast.makeText( Toast.makeText(
activity.applicationContext, activity,
activity.applicationContext.getString(R.string.git_push_up_to_date), activity.applicationContext.getString(R.string.git_push_up_to_date),
Toast.LENGTH_SHORT Toast.LENGTH_SHORT
) )