request SD card permissions at rotating fullscreen image
This commit is contained in:
parent
bffa42fe65
commit
82d97bb380
1 changed files with 11 additions and 0 deletions
|
@ -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…
Reference in a new issue