mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-02-18 13:00:36 +01:00
request SD card permissions at rotating fullscreen image
This commit is contained in:
parent
bffa42fe65
commit
82d97bb380
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user