fix: Prevent memory leak when updating shortcuts (#443)

Shortcuts were being updated using `MainActivity.this` as the `Context`
and leaking in `ShortcutManagerCompat`. Use the application context to
fix this.
This commit is contained in:
Nik Clayton 2024-02-15 00:25:37 +01:00 committed by GitHub
parent 0d826bc2d6
commit 2cf7c072ca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -1025,7 +1025,7 @@ class MainActivity : BottomSheetActivity(), ActionButtonActivity, MenuProvider {
}
updateProfiles()
updateShortcut(this, accountManager.activeAccount!!)
updateShortcut(applicationContext, accountManager.activeAccount!!)
}
@SuppressLint("CheckResult")