mirror of
https://github.com/SimpleMobileTools/Simple-File-Manager.git
synced 2025-06-05 22:09:15 +02:00
allow changing the column level with zooming again
This commit is contained in:
parent
10ab22508f
commit
f2c1f7688a
@ -291,7 +291,7 @@ class MainActivity : SimpleActivity() {
|
|||||||
|
|
||||||
private fun changeViewType() {
|
private fun changeViewType() {
|
||||||
ChangeViewTypeDialog(this, fragment.currentPath) {
|
ChangeViewTypeDialog(this, fragment.currentPath) {
|
||||||
fragment.setupLayoutManager(true)
|
fragment.setupLayoutManager()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,7 +69,6 @@ class ItemsFragment : Fragment(), ItemOperationsListener, Breadcrumbs.Breadcrumb
|
|||||||
breadcrumbs.listener = this@ItemsFragment
|
breadcrumbs.listener = this@ItemsFragment
|
||||||
breadcrumbs.updateFontSize(context!!.getTextSize())
|
breadcrumbs.updateFontSize(context!!.getTextSize())
|
||||||
}
|
}
|
||||||
initZoomListener()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onSaveInstanceState(outState: Bundle) {
|
override fun onSaveInstanceState(outState: Bundle) {
|
||||||
@ -156,9 +155,8 @@ class ItemsFragment : Fragment(), ItemOperationsListener, Breadcrumbs.Breadcrumb
|
|||||||
activity?.runOnUiThread {
|
activity?.runOnUiThread {
|
||||||
activity?.invalidateOptionsMenu()
|
activity?.invalidateOptionsMenu()
|
||||||
addItems(listItems, forceRefresh)
|
addItems(listItems, forceRefresh)
|
||||||
val curr = context?.config?.getFolderViewType(currentPath)
|
|
||||||
if (currentViewType != context?.config?.getFolderViewType(currentPath)) {
|
if (currentViewType != context?.config?.getFolderViewType(currentPath)) {
|
||||||
setupLayoutManager(true)
|
setupLayoutManager()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -412,7 +410,7 @@ class ItemsFragment : Fragment(), ItemOperationsListener, Breadcrumbs.Breadcrumb
|
|||||||
|
|
||||||
private fun getRecyclerAdapter() = mView.items_list.adapter as? ItemsAdapter
|
private fun getRecyclerAdapter() = mView.items_list.adapter as? ItemsAdapter
|
||||||
|
|
||||||
fun setupLayoutManager(resetAdapter: Boolean) {
|
fun setupLayoutManager() {
|
||||||
if (context!!.config.getFolderViewType(currentPath) == VIEW_TYPE_GRID) {
|
if (context!!.config.getFolderViewType(currentPath) == VIEW_TYPE_GRID) {
|
||||||
currentViewType = VIEW_TYPE_GRID
|
currentViewType = VIEW_TYPE_GRID
|
||||||
setupGridLayoutManager()
|
setupGridLayoutManager()
|
||||||
@ -421,10 +419,9 @@ class ItemsFragment : Fragment(), ItemOperationsListener, Breadcrumbs.Breadcrumb
|
|||||||
setupListLayoutManager()
|
setupListLayoutManager()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (resetAdapter) {
|
mView.items_list.adapter = null
|
||||||
mView.items_list.adapter = null
|
initZoomListener()
|
||||||
addItems(storedItems, true)
|
addItems(storedItems, true)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupGridLayoutManager() {
|
private fun setupGridLayoutManager() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user