always refresh viewpager when successfully returning from the editor
This commit is contained in:
parent
02b6525ee9
commit
97236d6ed2
|
@ -46,7 +46,7 @@ ext {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.simplemobiletools:commons:3.13.0'
|
||||
implementation 'com.simplemobiletools:commons:3.13.4'
|
||||
implementation 'com.theartofdev.edmodo:android-image-cropper:2.6.0'
|
||||
implementation 'com.android.support:multidex:1.0.2'
|
||||
implementation 'com.google.code.gson:gson:2.8.2'
|
||||
|
|
|
@ -204,7 +204,7 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener
|
|||
Thread {
|
||||
val file = File(path)
|
||||
val fileDirItem = FileDirItem(path, path.getFilenameFromPath())
|
||||
getFileOutputStream(fileDirItem) {
|
||||
getFileOutputStream(fileDirItem, true) {
|
||||
if (it != null) {
|
||||
saveBitmap(file, bitmap, it)
|
||||
} else {
|
||||
|
|
|
@ -654,8 +654,9 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
|||
}
|
||||
|
||||
private fun checkLastMediaChanged() {
|
||||
if (isActivityDestroyed())
|
||||
if (isActivityDestroyed()) {
|
||||
return
|
||||
}
|
||||
|
||||
mLastMediaHandler.removeCallbacksAndMessages(null)
|
||||
mLastMediaHandler.postDelayed({
|
||||
|
|
|
@ -713,6 +713,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||
if (requestCode == REQUEST_EDIT_IMAGE) {
|
||||
if (resultCode == Activity.RESULT_OK && resultData != null) {
|
||||
mPos = -1
|
||||
mPrevHashcode = 0
|
||||
refreshViewPager()
|
||||
}
|
||||
} else if (requestCode == REQUEST_SET_AS) {
|
||||
|
|
Loading…
Reference in New Issue