mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 22:47:59 +01:00
stop media fetching on pause only if its not our first time there
This commit is contained in:
parent
56f513beca
commit
c2ea3ad4bb
2 changed files with 8 additions and 2 deletions
|
@ -166,8 +166,11 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
||||||
mStoredTextColor = config.textColor
|
mStoredTextColor = config.textColor
|
||||||
directories_grid.listener = null
|
directories_grid.listener = null
|
||||||
mLastMediaHandler.removeCallbacksAndMessages(null)
|
mLastMediaHandler.removeCallbacksAndMessages(null)
|
||||||
|
|
||||||
|
if (!mDirs.isEmpty()) {
|
||||||
mCurrAsyncTask?.stopFetching()
|
mCurrAsyncTask?.stopFetching()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override fun onDestroy() {
|
override fun onDestroy() {
|
||||||
super.onDestroy()
|
super.onDestroy()
|
||||||
|
|
|
@ -125,8 +125,11 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
||||||
mStoredTextColor = config.textColor
|
mStoredTextColor = config.textColor
|
||||||
media_grid.listener = null
|
media_grid.listener = null
|
||||||
mLastMediaHandler.removeCallbacksAndMessages(null)
|
mLastMediaHandler.removeCallbacksAndMessages(null)
|
||||||
|
|
||||||
|
if (!mMedia.isEmpty()) {
|
||||||
mCurrAsyncTask?.stopFetching()
|
mCurrAsyncTask?.stopFetching()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override fun onDestroy() {
|
override fun onDestroy() {
|
||||||
super.onDestroy()
|
super.onDestroy()
|
||||||
|
|
Loading…
Reference in a new issue