mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-02-07 15:48:52 +01:00
show the Media Management prompt on Android 12+ from time to time
This commit is contained in:
parent
0483e30eda
commit
0679b22887
@ -64,6 +64,7 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
|
||||
private var mShouldStopFetching = false
|
||||
private var mIsSearchOpen = false
|
||||
private var mWasDefaultFolderChecked = false
|
||||
private var mWasMediaManagementPromptShown = false
|
||||
private var mLatestMediaId = 0L
|
||||
private var mLatestMediaDateId = 0L
|
||||
private var mCurrentPathPrefix = "" // used at "Group direct subfolders" for navigation
|
||||
@ -158,6 +159,10 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
|
||||
callback(granted)
|
||||
if (granted && isRPlus()) {
|
||||
handlePermission(PERMISSION_MEDIA_LOCATION) {}
|
||||
if (!mWasMediaManagementPromptShown && (config.appRunCount == 1 || config.appRunCount % 5 == 0)) {
|
||||
mWasMediaManagementPromptShown = true
|
||||
handleMediaManagementPrompt { }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user