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) {
|
||||
val currentPath = getCurrentPath()
|
||||
if (needsStupidWritePermissions(currentPath)) {
|
||||
handleSAFDialog(currentPath) {
|
||||
rotateBy(degrees)
|
||||
}
|
||||
} else {
|
||||
rotateBy(degrees)
|
||||
}
|
||||
}
|
||||
|
||||
private fun rotateBy(degrees: Int) {
|
||||
mRotationDegrees = (mRotationDegrees + degrees) % 360
|
||||
getCurrentFragment()?.let {
|
||||
(it as? PhotoFragment)?.rotateImageViewBy(mRotationDegrees)
|
||||
|
|
Loading…
Reference in New Issue