diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt index ccc09a886..90dd25390 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt @@ -34,8 +34,8 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener { private var mSnackbar: Snackbar? = null - lateinit var mToBeDeleted: ArrayList - lateinit var mMedia: ArrayList + private var mToBeDeleted = ArrayList() + private var mMedia = ArrayList() private var mPath = "" private var mIsGetImageIntent = false @@ -55,7 +55,6 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener { media_holder.setOnRefreshListener({ getMedia() }) mPath = intent.getStringExtra(DIRECTORY) - mToBeDeleted = ArrayList() mMedia = ArrayList() } diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt index 099198594..a7b403f39 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt @@ -239,7 +239,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View } private fun reloadViewPager() { - GetMediaAsynctask(applicationContext, mDirectory, false, false, MediaActivity.mToBeDeleted) { + GetMediaAsynctask(applicationContext, mDirectory, false, false, ArrayList()) { mMedia = it if (isDirEmpty()) return@GetMediaAsynctask