fix #420, increase the max column count to 20

This commit is contained in:
tibbi 2017-11-06 17:59:54 +01:00
parent 5c929f43ed
commit 733e9403dd
3 changed files with 5 additions and 4 deletions

View file

@ -94,7 +94,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
menuInflater.inflate(R.menu.menu_main_intent, menu)
} else {
menuInflater.inflate(R.menu.menu_main, menu)
menu.findItem(R.id.increase_column_count).isVisible = config.viewTypeFolders == VIEW_TYPE_GRID && config.dirColumnCnt < 10
menu.findItem(R.id.increase_column_count).isVisible = config.viewTypeFolders == VIEW_TYPE_GRID && config.dirColumnCnt < MAX_COLUMN_COUNT
menu.findItem(R.id.reduce_column_count).isVisible = config.viewTypeFolders == VIEW_TYPE_GRID && config.dirColumnCnt > 1
}
menu.findItem(R.id.temporarily_show_hidden).isVisible = !config.shouldShowHidden
@ -343,7 +343,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
}
override fun zoomOut() {
if (layoutManager.spanCount < 10) {
if (layoutManager.spanCount < MAX_COLUMN_COUNT) {
increaseColumnCount()
getRecyclerAdapter().actMode?.finish()
}

View file

@ -231,7 +231,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
findItem(R.id.temporarily_show_hidden).isVisible = !config.shouldShowHidden
findItem(R.id.stop_showing_hidden).isVisible = config.temporarilyShowHidden
findItem(R.id.increase_column_count).isVisible = config.viewTypeFiles == VIEW_TYPE_GRID && config.mediaColumnCnt < 10
findItem(R.id.increase_column_count).isVisible = config.viewTypeFiles == VIEW_TYPE_GRID && config.mediaColumnCnt < MAX_COLUMN_COUNT
findItem(R.id.reduce_column_count).isVisible = config.viewTypeFiles == VIEW_TYPE_GRID && config.mediaColumnCnt > 1
findItem(R.id.toggle_filename).isVisible = config.viewTypeFiles == VIEW_TYPE_GRID
@ -419,7 +419,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
}
override fun zoomOut() {
if (layoutManager.spanCount < 10) {
if (layoutManager.spanCount < MAX_COLUMN_COUNT) {
increaseColumnCount()
getRecyclerAdapter().actMode?.finish()
}

View file

@ -56,6 +56,7 @@ val SLIDESHOW_DEFAULT_INTERVAL = 5
val SLIDESHOW_SCROLL_DURATION = 500L
val NOMEDIA = ".nomedia"
val MAX_COLUMN_COUNT = 20
val DIRECTORY = "directory"
val MEDIUM = "medium"