properly handle folder locking at shortcuts and widgets
This commit is contained in:
parent
a754b7a082
commit
8ece25d033
2 changed files with 19 additions and 3 deletions
|
@ -160,7 +160,13 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
|
||||||
media_empty_text_placeholder_2.setTextColor(getAdjustedPrimaryColor())
|
media_empty_text_placeholder_2.setTextColor(getAdjustedPrimaryColor())
|
||||||
|
|
||||||
if (mMedia.isEmpty() || config.getFolderSorting(mPath) and SORT_BY_RANDOM == 0) {
|
if (mMedia.isEmpty() || config.getFolderSorting(mPath) and SORT_BY_RANDOM == 0) {
|
||||||
|
handleLockedFolderOpening(mPath) {
|
||||||
|
if (it) {
|
||||||
tryLoadGallery()
|
tryLoadGallery()
|
||||||
|
} else {
|
||||||
|
finish()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -306,6 +306,18 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
showSystemUI(true)
|
||||||
|
|
||||||
|
handleLockedFolderOpening(mPath.getParentPath()) {
|
||||||
|
if (it) {
|
||||||
|
initContinue()
|
||||||
|
} else {
|
||||||
|
finish()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun initContinue() {
|
||||||
if (intent.extras?.containsKey(IS_VIEW_INTENT) == true) {
|
if (intent.extras?.containsKey(IS_VIEW_INTENT) == true) {
|
||||||
if (isShowHiddenFlagNeeded()) {
|
if (isShowHiddenFlagNeeded()) {
|
||||||
if (!config.isHiddenPasswordProtectionOn) {
|
if (!config.isHiddenPasswordProtectionOn) {
|
||||||
|
@ -316,8 +328,6 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
config.isThirdPartyIntent = true
|
config.isThirdPartyIntent = true
|
||||||
}
|
}
|
||||||
|
|
||||||
showSystemUI(true)
|
|
||||||
|
|
||||||
val isShowingFavorites = intent.getBooleanExtra(SHOW_FAVORITES, false)
|
val isShowingFavorites = intent.getBooleanExtra(SHOW_FAVORITES, false)
|
||||||
val isShowingRecycleBin = intent.getBooleanExtra(SHOW_RECYCLE_BIN, false)
|
val isShowingRecycleBin = intent.getBooleanExtra(SHOW_RECYCLE_BIN, false)
|
||||||
mDirectory = when {
|
mDirectory = when {
|
||||||
|
|
Loading…
Reference in a new issue