stop media fetching on pause only if its not our first time there

This commit is contained in:
tibbi 2017-10-04 18:53:45 +02:00
parent 56f513beca
commit c2ea3ad4bb
2 changed files with 8 additions and 2 deletions

View file

@ -166,8 +166,11 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
mStoredTextColor = config.textColor
directories_grid.listener = null
mLastMediaHandler.removeCallbacksAndMessages(null)
if (!mDirs.isEmpty()) {
mCurrAsyncTask?.stopFetching()
}
}
override fun onDestroy() {
super.onDestroy()

View file

@ -125,8 +125,11 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
mStoredTextColor = config.textColor
media_grid.listener = null
mLastMediaHandler.removeCallbacksAndMessages(null)
if (!mMedia.isEmpty()) {
mCurrAsyncTask?.stopFetching()
}
}
override fun onDestroy() {
super.onDestroy()