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>() {
|
) : RecyclerView.Adapter<RecyclerView.ViewHolder>() {
|
||||||
val dateFormat: DateFormat = DateFormat.getDateTimeInstance(DateFormat.DEFAULT, DateFormat.DEFAULT, Locale.getDefault())
|
val dateFormat: DateFormat = DateFormat.getDateTimeInstance(DateFormat.DEFAULT, DateFormat.DEFAULT, Locale.getDefault())
|
||||||
var explorerElements = listOf<ExplorerElement>()
|
var explorerElements = listOf<ExplorerElement>()
|
||||||
set(value) {
|
|
||||||
field = value
|
|
||||||
unSelectAll()
|
|
||||||
}
|
|
||||||
val selectedItems: MutableList<Int> = ArrayList()
|
val selectedItems: MutableList<Int> = ArrayList()
|
||||||
|
|
||||||
override fun getItemCount(): Int {
|
override fun getItemCount(): Int {
|
||||||
|
@ -223,6 +223,7 @@ open class BaseExplorerActivity : BaseActivity() {
|
|||||||
ExplorerElement.sortBy(sortOrderValues[currentSortOrderIndex], foldersFirst, explorerElements)
|
ExplorerElement.sortBy(sortOrderValues[currentSortOrderIndex], foldersFirst, explorerElements)
|
||||||
}
|
}
|
||||||
explorerAdapter.explorerElements = explorerElements
|
explorerAdapter.explorerElements = explorerElements
|
||||||
|
unselectAll()
|
||||||
val sharedPrefsEditor = sharedPrefs.edit()
|
val sharedPrefsEditor = sharedPrefs.edit()
|
||||||
sharedPrefsEditor.putString(ConstValues.sort_order_key, sortOrderValues[currentSortOrderIndex])
|
sharedPrefsEditor.putString(ConstValues.sort_order_key, sortOrderValues[currentSortOrderIndex])
|
||||||
sharedPrefsEditor.apply()
|
sharedPrefsEditor.apply()
|
||||||
|
@ -343,7 +343,6 @@ class ExplorerActivity : BaseExplorerActivity() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
cancelItemAction()
|
cancelItemAction()
|
||||||
unselectAll()
|
|
||||||
}
|
}
|
||||||
} else if (currentItemAction == ItemsActions.MOVE){
|
} else if (currentItemAction == ItemsActions.MOVE){
|
||||||
mapFileForMove(itemsToProcess, itemsToProcess[0].explorerElement.parentPath)
|
mapFileForMove(itemsToProcess, itemsToProcess[0].explorerElement.parentPath)
|
||||||
@ -365,7 +364,6 @@ class ExplorerActivity : BaseExplorerActivity() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
cancelItemAction()
|
cancelItemAction()
|
||||||
unselectAll()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
true
|
true
|
||||||
@ -459,7 +457,6 @@ class ExplorerActivity : BaseExplorerActivity() {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
unselectAll()
|
|
||||||
setCurrentPath(currentDirectoryPath) //refresh
|
setCurrentPath(currentDirectoryPath) //refresh
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user