From a3b88c1dee8602bdfe491d172e136b5747e5a137 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Fri, 3 Mar 2023 23:27:45 +0530 Subject: 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. --- app/src/main/java/app/passwordstore/util/git/GitCommandExecutor.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/app/passwordstore/util/git/GitCommandExecutor.kt b/app/src/main/java/app/passwordstore/util/git/GitCommandExecutor.kt index 40fd0fff..f2e647c2 100644 --- a/app/src/main/java/app/passwordstore/util/git/GitCommandExecutor.kt +++ b/app/src/main/java/app/passwordstore/util/git/GitCommandExecutor.kt @@ -103,7 +103,7 @@ class GitCommandExecutor( RemoteRefUpdate.Status.UP_TO_DATE -> { withContext(Dispatchers.Main) { Toast.makeText( - activity.applicationContext, + activity, activity.applicationContext.getString(R.string.git_push_up_to_date), Toast.LENGTH_SHORT ) -- cgit v1.2.3