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
|
private var mSnackbar: Snackbar? = null
|
||||||
|
|
||||||
lateinit var mToBeDeleted: ArrayList<String>
|
private var mToBeDeleted = ArrayList<String>()
|
||||||
lateinit var mMedia: ArrayList<Medium>
|
private var mMedia = ArrayList<Medium>()
|
||||||
|
|
||||||
private var mPath = ""
|
private var mPath = ""
|
||||||
private var mIsGetImageIntent = false
|
private var mIsGetImageIntent = false
|
||||||
|
@ -55,7 +55,6 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
||||||
|
|
||||||
media_holder.setOnRefreshListener({ getMedia() })
|
media_holder.setOnRefreshListener({ getMedia() })
|
||||||
mPath = intent.getStringExtra(DIRECTORY)
|
mPath = intent.getStringExtra(DIRECTORY)
|
||||||
mToBeDeleted = ArrayList<String>()
|
|
||||||
mMedia = ArrayList<Medium>()
|
mMedia = ArrayList<Medium>()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -239,7 +239,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun reloadViewPager() {
|
private fun reloadViewPager() {
|
||||||
GetMediaAsynctask(applicationContext, mDirectory, false, false, MediaActivity.mToBeDeleted) {
|
GetMediaAsynctask(applicationContext, mDirectory, false, false, ArrayList<String>()) {
|
||||||
mMedia = it
|
mMedia = it
|
||||||
if (isDirEmpty())
|
if (isDirEmpty())
|
||||||
return@GetMediaAsynctask
|
return@GetMediaAsynctask
|
||||||
|
|
Loading…
Reference in a new issue