mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
request SD card permissions at rotating fullscreen image
This commit is contained in:
@ -557,6 +557,17 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun rotateImage(degrees: Int) {
|
private fun rotateImage(degrees: Int) {
|
||||||
|
val currentPath = getCurrentPath()
|
||||||
|
if (needsStupidWritePermissions(currentPath)) {
|
||||||
|
handleSAFDialog(currentPath) {
|
||||||
|
rotateBy(degrees)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
rotateBy(degrees)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun rotateBy(degrees: Int) {
|
||||||
mRotationDegrees = (mRotationDegrees + degrees) % 360
|
mRotationDegrees = (mRotationDegrees + degrees) % 360
|
||||||
getCurrentFragment()?.let {
|
getCurrentFragment()?.let {
|
||||||
(it as? PhotoFragment)?.rotateImageViewBy(mRotationDegrees)
|
(it as? PhotoFragment)?.rotateImageViewBy(mRotationDegrees)
|
||||||
|
Reference in New Issue
Block a user