mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-23 13:08:00 +01:00
remove the Hide/show recycle bin menu items from the main screen
This commit is contained in:
parent
aee51a0294
commit
e2ae1ddc4b
3 changed files with 1 additions and 28 deletions
|
@ -78,7 +78,7 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:a1ecb048c0'
|
implementation 'com.github.SimpleMobileTools:Simple-Commons:ecdc896381'
|
||||||
implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
|
implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
|
||||||
implementation 'it.sephiroth.android.exif:library:1.0.1'
|
implementation 'it.sephiroth.android.exif:library:1.0.1'
|
||||||
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.24'
|
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.24'
|
||||||
|
|
|
@ -306,12 +306,9 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
|
||||||
|
|
||||||
private fun refreshMenuItems() {
|
private fun refreshMenuItems() {
|
||||||
if (!mIsThirdPartyIntent) {
|
if (!mIsThirdPartyIntent) {
|
||||||
val useBin = config.useRecycleBin
|
|
||||||
directories_toolbar.menu.apply {
|
directories_toolbar.menu.apply {
|
||||||
findItem(R.id.increase_column_count).isVisible = config.viewTypeFolders == VIEW_TYPE_GRID && config.dirColumnCnt < MAX_COLUMN_COUNT
|
findItem(R.id.increase_column_count).isVisible = config.viewTypeFolders == VIEW_TYPE_GRID && config.dirColumnCnt < MAX_COLUMN_COUNT
|
||||||
findItem(R.id.reduce_column_count).isVisible = config.viewTypeFolders == VIEW_TYPE_GRID && config.dirColumnCnt > 1
|
findItem(R.id.reduce_column_count).isVisible = config.viewTypeFolders == VIEW_TYPE_GRID && config.dirColumnCnt > 1
|
||||||
findItem(R.id.hide_the_recycle_bin).isVisible = useBin && config.showRecycleBinAtFolders
|
|
||||||
findItem(R.id.show_the_recycle_bin).isVisible = useBin && !config.showRecycleBinAtFolders
|
|
||||||
findItem(R.id.set_as_default_folder).isVisible = !config.defaultFolder.isEmpty()
|
findItem(R.id.set_as_default_folder).isVisible = !config.defaultFolder.isEmpty()
|
||||||
findItem(R.id.more_apps_from_us).isVisible = !resources.getBoolean(R.bool.hide_google_relations)
|
findItem(R.id.more_apps_from_us).isVisible = !resources.getBoolean(R.bool.hide_google_relations)
|
||||||
setupSearch(this)
|
setupSearch(this)
|
||||||
|
@ -352,8 +349,6 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
|
||||||
R.id.temporarily_show_excluded -> tryToggleTemporarilyShowExcluded()
|
R.id.temporarily_show_excluded -> tryToggleTemporarilyShowExcluded()
|
||||||
R.id.stop_showing_excluded -> tryToggleTemporarilyShowExcluded()
|
R.id.stop_showing_excluded -> tryToggleTemporarilyShowExcluded()
|
||||||
R.id.create_new_folder -> createNewFolder()
|
R.id.create_new_folder -> createNewFolder()
|
||||||
R.id.show_the_recycle_bin -> toggleRecycleBin(true)
|
|
||||||
R.id.hide_the_recycle_bin -> toggleRecycleBin(false)
|
|
||||||
R.id.increase_column_count -> increaseColumnCount()
|
R.id.increase_column_count -> increaseColumnCount()
|
||||||
R.id.reduce_column_count -> reduceColumnCount()
|
R.id.reduce_column_count -> reduceColumnCount()
|
||||||
R.id.set_as_default_folder -> setAsDefaultFolder()
|
R.id.set_as_default_folder -> setAsDefaultFolder()
|
||||||
|
@ -751,18 +746,6 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun toggleRecycleBin(show: Boolean) {
|
|
||||||
config.showRecycleBinAtFolders = show
|
|
||||||
refreshMenuItems()
|
|
||||||
ensureBackgroundThread {
|
|
||||||
var dirs = getCurrentlyDisplayedDirs()
|
|
||||||
if (!show) {
|
|
||||||
dirs = dirs.filter { it.path != RECYCLE_BIN } as ArrayList<Directory>
|
|
||||||
}
|
|
||||||
gotDirectories(dirs)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun createNewFolder() {
|
private fun createNewFolder() {
|
||||||
FilePickerDialog(this, internalStoragePath, false, config.shouldShowHidden, false, true) {
|
FilePickerDialog(this, internalStoragePath, false, config.shouldShowHidden, false, true) {
|
||||||
CreateNewFolderDialog(this, it) {
|
CreateNewFolderDialog(this, it) {
|
||||||
|
|
|
@ -54,16 +54,6 @@
|
||||||
android:showAsAction="never"
|
android:showAsAction="never"
|
||||||
android:title="@string/show_all"
|
android:title="@string/show_all"
|
||||||
app:showAsAction="never" />
|
app:showAsAction="never" />
|
||||||
<item
|
|
||||||
android:id="@+id/show_the_recycle_bin"
|
|
||||||
android:showAsAction="never"
|
|
||||||
android:title="@string/show_the_recycle_bin"
|
|
||||||
app:showAsAction="never" />
|
|
||||||
<item
|
|
||||||
android:id="@+id/hide_the_recycle_bin"
|
|
||||||
android:showAsAction="never"
|
|
||||||
android:title="@string/hide_the_recycle_bin"
|
|
||||||
app:showAsAction="never" />
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/set_as_default_folder"
|
android:id="@+id/set_as_default_folder"
|
||||||
android:showAsAction="never"
|
android:showAsAction="never"
|
||||||
|
|
Loading…
Reference in a new issue