mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-25 22:18:00 +01:00
Handle access_more_media options menu
This commit is contained in:
parent
3303a6d638
commit
763e0eacc6
5 changed files with 6 additions and 4 deletions
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -48,7 +48,7 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList
|
|||
|
||||
setupOptionsMenu()
|
||||
refreshMenuItems()
|
||||
handlePermission(getPermissionToRequest()) {
|
||||
handlePartialMediaPermissions(getPermissionsToRequest()) {
|
||||
if (it) {
|
||||
checkIntent(savedInstanceState)
|
||||
} else {
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue