forked from hardcoresushi/DroidFS
Invalidate options menu when changing explorer elements
This commit is contained in:
parent
83525159e3
commit
d1a556b8c6
@ -27,10 +27,6 @@ class ExplorerElementAdapter(
|
||||
) : RecyclerView.Adapter<RecyclerView.ViewHolder>() {
|
||||
val dateFormat: DateFormat = DateFormat.getDateTimeInstance(DateFormat.DEFAULT, DateFormat.DEFAULT, Locale.getDefault())
|
||||
var explorerElements = listOf<ExplorerElement>()
|
||||
set(value) {
|
||||
field = value
|
||||
unSelectAll()
|
||||
}
|
||||
val selectedItems: MutableList<Int> = ArrayList()
|
||||
|
||||
override fun getItemCount(): Int {
|
||||
|
@ -223,6 +223,7 @@ open class BaseExplorerActivity : BaseActivity() {
|
||||
ExplorerElement.sortBy(sortOrderValues[currentSortOrderIndex], foldersFirst, explorerElements)
|
||||
}
|
||||
explorerAdapter.explorerElements = explorerElements
|
||||
unselectAll()
|
||||
val sharedPrefsEditor = sharedPrefs.edit()
|
||||
sharedPrefsEditor.putString(ConstValues.sort_order_key, sortOrderValues[currentSortOrderIndex])
|
||||
sharedPrefsEditor.apply()
|
||||
|
@ -343,7 +343,6 @@ class ExplorerActivity : BaseExplorerActivity() {
|
||||
}
|
||||
}
|
||||
cancelItemAction()
|
||||
unselectAll()
|
||||
}
|
||||
} else if (currentItemAction == ItemsActions.MOVE){
|
||||
mapFileForMove(itemsToProcess, itemsToProcess[0].explorerElement.parentPath)
|
||||
@ -365,7 +364,6 @@ class ExplorerActivity : BaseExplorerActivity() {
|
||||
}
|
||||
}
|
||||
cancelItemAction()
|
||||
unselectAll()
|
||||
}
|
||||
}
|
||||
true
|
||||
@ -459,7 +457,6 @@ class ExplorerActivity : BaseExplorerActivity() {
|
||||
break
|
||||
}
|
||||
}
|
||||
unselectAll()
|
||||
setCurrentPath(currentDirectoryPath) //refresh
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user