mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-23 13:08:00 +01:00
do not refresh the thumbnails at Random sorting that often
This commit is contained in:
parent
c856f8a9e3
commit
fc04a9c697
2 changed files with 7 additions and 3 deletions
|
@ -61,7 +61,7 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.simplemobiletools:commons:5.9.2'
|
implementation 'com.simplemobiletools:commons:5.9.3'
|
||||||
implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
|
implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
|
||||||
implementation 'androidx.multidex:multidex:2.0.1'
|
implementation 'androidx.multidex:multidex:2.0.1'
|
||||||
implementation 'it.sephiroth.android.exif:library:1.0.1'
|
implementation 'it.sephiroth.android.exif:library:1.0.1'
|
||||||
|
|
|
@ -25,6 +25,7 @@ import com.simplemobiletools.commons.dialogs.ConfirmationDialog
|
||||||
import com.simplemobiletools.commons.extensions.*
|
import com.simplemobiletools.commons.extensions.*
|
||||||
import com.simplemobiletools.commons.helpers.PERMISSION_WRITE_STORAGE
|
import com.simplemobiletools.commons.helpers.PERMISSION_WRITE_STORAGE
|
||||||
import com.simplemobiletools.commons.helpers.REQUEST_EDIT_IMAGE
|
import com.simplemobiletools.commons.helpers.REQUEST_EDIT_IMAGE
|
||||||
|
import com.simplemobiletools.commons.helpers.SORT_BY_RANDOM
|
||||||
import com.simplemobiletools.commons.models.FileDirItem
|
import com.simplemobiletools.commons.models.FileDirItem
|
||||||
import com.simplemobiletools.commons.views.MyGridLayoutManager
|
import com.simplemobiletools.commons.views.MyGridLayoutManager
|
||||||
import com.simplemobiletools.commons.views.MyRecyclerView
|
import com.simplemobiletools.commons.views.MyRecyclerView
|
||||||
|
@ -152,10 +153,13 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
|
||||||
media_horizontal_fastscroller.allowBubbleDisplay = config.showInfoBubble
|
media_horizontal_fastscroller.allowBubbleDisplay = config.showInfoBubble
|
||||||
media_vertical_fastscroller.allowBubbleDisplay = config.showInfoBubble
|
media_vertical_fastscroller.allowBubbleDisplay = config.showInfoBubble
|
||||||
media_refresh_layout.isEnabled = config.enablePullToRefresh
|
media_refresh_layout.isEnabled = config.enablePullToRefresh
|
||||||
tryLoadGallery()
|
|
||||||
invalidateOptionsMenu()
|
invalidateOptionsMenu()
|
||||||
media_empty_text_label.setTextColor(config.textColor)
|
media_empty_text_label.setTextColor(config.textColor)
|
||||||
media_empty_text.setTextColor(getAdjustedPrimaryColor())
|
media_empty_text.setTextColor(getAdjustedPrimaryColor())
|
||||||
|
|
||||||
|
if (mMedia.isEmpty() || config.getFileSorting(mPath) and SORT_BY_RANDOM == 0) {
|
||||||
|
tryLoadGallery()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onPause() {
|
override fun onPause() {
|
||||||
|
@ -413,7 +417,7 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun checkLastMediaChanged() {
|
private fun checkLastMediaChanged() {
|
||||||
if (isDestroyed) {
|
if (isDestroyed || config.getFileSorting(mPath) and SORT_BY_RANDOM != 0) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue