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()
|
setupOptionsMenu()
|
||||||
handlePermission(getPermissionToRequest()) {
|
handlePartialMediaPermissions(getPermissionsToRequest()) {
|
||||||
if (!it) {
|
if (!it) {
|
||||||
toast(com.simplemobiletools.commons.R.string.no_storage_permissions)
|
toast(com.simplemobiletools.commons.R.string.no_storage_permissions)
|
||||||
finish()
|
finish()
|
||||||
|
|
|
@ -361,6 +361,8 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
|
||||||
|
|
||||||
findItem(R.id.temporarily_show_excluded).isVisible = !config.temporarilyShowExcluded
|
findItem(R.id.temporarily_show_excluded).isVisible = !config.temporarilyShowExcluded
|
||||||
findItem(R.id.stop_showing_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() {
|
private fun tryLoadGallery() {
|
||||||
handlePermission(getPermissionToRequest()) {
|
handlePartialMediaPermissions(getPermissionsToRequest()) {
|
||||||
if (it) {
|
if (it) {
|
||||||
val dirName = when {
|
val dirName = when {
|
||||||
mPath == FAVORITES -> getString(com.simplemobiletools.commons.R.string.favorites)
|
mPath == FAVORITES -> getString(com.simplemobiletools.commons.R.string.favorites)
|
||||||
|
|
|
@ -48,7 +48,7 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList
|
||||||
|
|
||||||
setupOptionsMenu()
|
setupOptionsMenu()
|
||||||
refreshMenuItems()
|
refreshMenuItems()
|
||||||
handlePermission(getPermissionToRequest()) {
|
handlePartialMediaPermissions(getPermissionsToRequest()) {
|
||||||
if (it) {
|
if (it) {
|
||||||
checkIntent(savedInstanceState)
|
checkIntent(savedInstanceState)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -97,7 +97,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
checkNotchSupport()
|
checkNotchSupport()
|
||||||
(MediaActivity.mMedia.clone() as ArrayList<ThumbnailItem>).filterIsInstanceTo(mMediaFiles, Medium::class.java)
|
(MediaActivity.mMedia.clone() as ArrayList<ThumbnailItem>).filterIsInstanceTo(mMediaFiles, Medium::class.java)
|
||||||
|
|
||||||
handlePermission(getPermissionToRequest()) {
|
handlePartialMediaPermissions(getPermissionsToRequest()) {
|
||||||
if (it) {
|
if (it) {
|
||||||
initViewPager()
|
initViewPager()
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue