fix some crashes related unitialized lateinit variable
This commit is contained in:
parent
32a91a7de9
commit
f0f07d9c8d
2 changed files with 3 additions and 4 deletions
|
@ -34,8 +34,8 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
|||
|
||||
private var mSnackbar: Snackbar? = null
|
||||
|
||||
lateinit var mToBeDeleted: ArrayList<String>
|
||||
lateinit var mMedia: ArrayList<Medium>
|
||||
private var mToBeDeleted = ArrayList<String>()
|
||||
private var mMedia = ArrayList<Medium>()
|
||||
|
||||
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<String>()
|
||||
mMedia = ArrayList<Medium>()
|
||||
}
|
||||
|
||||
|
|
|
@ -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<String>()) {
|
||||
mMedia = it
|
||||
if (isDirEmpty())
|
||||
return@GetMediaAsynctask
|
||||
|
|
Loading…
Reference in a new issue