mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
add batch image rotation at the thumbnails screen
This commit is contained in:
@ -137,6 +137,9 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList<Thumbnai
|
||||
R.id.cab_remove_from_favorites -> toggleFavorites(false)
|
||||
R.id.cab_restore_recycle_bin_files -> restoreFiles()
|
||||
R.id.cab_share -> shareMedia()
|
||||
R.id.cab_rotate_right -> rotateSelection(90)
|
||||
R.id.cab_rotate_left -> rotateSelection(270)
|
||||
R.id.cab_rotate_one_eighty -> rotateSelection(180)
|
||||
R.id.cab_copy_to -> copyMoveTo(true)
|
||||
R.id.cab_move_to -> moveFilesTo()
|
||||
R.id.cab_select_all -> selectAll()
|
||||
@ -273,6 +276,17 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList<Thumbnai
|
||||
}
|
||||
}
|
||||
|
||||
private fun rotateSelection(degrees: Int) {
|
||||
Thread {
|
||||
val paths = getSelectedPaths()
|
||||
paths.forEach {
|
||||
activity.saveRotatedImageToFile(it, it, degrees) {
|
||||
|
||||
}
|
||||
}
|
||||
}.start()
|
||||
}
|
||||
|
||||
private fun moveFilesTo() {
|
||||
activity.handleDeletePasswordProtection {
|
||||
copyMoveTo(false)
|
||||
|
Reference in New Issue
Block a user