Handle access_more_media options menu

This commit is contained in:
Ensar Sarajčić 2023-08-09 11:02:46 +02:00
parent 3303a6d638
commit 763e0eacc6
5 changed files with 6 additions and 4 deletions

View file

@ -101,7 +101,7 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener
}
setupOptionsMenu()
handlePermission(getPermissionToRequest()) {
handlePartialMediaPermissions(getPermissionsToRequest()) {
if (!it) {
toast(com.simplemobiletools.commons.R.string.no_storage_permissions)
finish()

View file

@ -361,6 +361,8 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
findItem(R.id.temporarily_show_excluded).isVisible = !config.temporarilyShowExcluded
findItem(R.id.stop_showing_excluded).isVisible = config.temporarilyShowExcluded
findItem(R.id.access_more_media).isVisible = isUpsideDownCakePlus()
}
}

View file

@ -382,7 +382,7 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
}
private fun tryLoadGallery() {
handlePermission(getPermissionToRequest()) {
handlePartialMediaPermissions(getPermissionsToRequest()) {
if (it) {
val dirName = when {
mPath == FAVORITES -> getString(com.simplemobiletools.commons.R.string.favorites)

View file

@ -48,7 +48,7 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList
setupOptionsMenu()
refreshMenuItems()
handlePermission(getPermissionToRequest()) {
handlePartialMediaPermissions(getPermissionsToRequest()) {
if (it) {
checkIntent(savedInstanceState)
} else {

View file

@ -97,7 +97,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
checkNotchSupport()
(MediaActivity.mMedia.clone() as ArrayList<ThumbnailItem>).filterIsInstanceTo(mMediaFiles, Medium::class.java)
handlePermission(getPermissionToRequest()) {
handlePartialMediaPermissions(getPermissionsToRequest()) {
if (it) {
initViewPager()
} else {