remove some redundant functions
This commit is contained in:
parent
11a98d69fe
commit
25d3eebb4f
2 changed files with 4 additions and 20 deletions
|
@ -184,8 +184,8 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||
|
||||
when (item.itemId) {
|
||||
R.id.menu_set_as_wallpaper -> trySetAsWallpaper(getCurrentFile())
|
||||
R.id.menu_copy_to -> copyTo()
|
||||
R.id.menu_move_to -> moveTo()
|
||||
R.id.menu_copy_to -> copyMoveTo(true)
|
||||
R.id.menu_move_to -> copyMoveTo(false)
|
||||
R.id.menu_open_with -> openWith(getCurrentFile())
|
||||
R.id.menu_hide -> toggleFileVisibility(true)
|
||||
R.id.menu_unhide -> toggleFileVisibility(false)
|
||||
|
@ -217,14 +217,6 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||
}
|
||||
}
|
||||
|
||||
private fun copyTo() {
|
||||
copyMoveTo(true)
|
||||
}
|
||||
|
||||
private fun moveTo() {
|
||||
copyMoveTo(false)
|
||||
}
|
||||
|
||||
private fun copyMoveTo(isCopyOperation: Boolean) {
|
||||
val files = ArrayList<File>(1).apply { add(getCurrentFile()) }
|
||||
tryCopyMoveFilesTo(files, isCopyOperation) {
|
||||
|
|
|
@ -83,8 +83,8 @@ class DirectoryAdapter(val activity: SimpleActivity, val dirs: MutableList<Direc
|
|||
R.id.cab_hide -> toggleFoldersVisibility(true)
|
||||
R.id.cab_unhide -> toggleFoldersVisibility(false)
|
||||
R.id.cab_exclude -> tryExcludeFolder()
|
||||
R.id.cab_copy_to -> copyTo()
|
||||
R.id.cab_move_to -> moveTo()
|
||||
R.id.cab_copy_to -> copyMoveTo(true)
|
||||
R.id.cab_move_to -> copyMoveTo(false)
|
||||
R.id.cab_select_all -> selectAll()
|
||||
R.id.cab_delete -> askConfirmDelete()
|
||||
else -> return false
|
||||
|
@ -243,14 +243,6 @@ class DirectoryAdapter(val activity: SimpleActivity, val dirs: MutableList<Direc
|
|||
}
|
||||
}
|
||||
|
||||
private fun copyTo() {
|
||||
copyMoveTo(true)
|
||||
}
|
||||
|
||||
private fun moveTo() {
|
||||
copyMoveTo(false)
|
||||
}
|
||||
|
||||
fun selectAll() {
|
||||
val cnt = dirs.size
|
||||
for (i in 0..cnt - 1) {
|
||||
|
|
Loading…
Reference in a new issue