do not set a default value used at redrawing media
This commit is contained in:
parent
19a81d2566
commit
fa28098500
1 changed files with 6 additions and 5 deletions
|
@ -262,8 +262,9 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupAdapter() {
|
private fun setupAdapter() {
|
||||||
if (isDirEmpty())
|
if (isDirEmpty()) {
|
||||||
return
|
return
|
||||||
|
}
|
||||||
|
|
||||||
val currAdapter = media_grid.adapter
|
val currAdapter = media_grid.adapter
|
||||||
if (currAdapter == null) {
|
if (currAdapter == null) {
|
||||||
|
@ -408,8 +409,9 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getMedia() {
|
private fun getMedia() {
|
||||||
if (mIsGettingMedia)
|
if (mIsGettingMedia) {
|
||||||
return
|
return
|
||||||
|
}
|
||||||
|
|
||||||
mIsGettingMedia = true
|
mIsGettingMedia = true
|
||||||
val media = getCachedMedia(mPath)
|
val media = getCachedMedia(mPath)
|
||||||
|
@ -599,11 +601,10 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
||||||
media_horizontal_fastscroller.beVisibleIf(media_grid.isVisible() && allowHorizontalScroll)
|
media_horizontal_fastscroller.beVisibleIf(media_grid.isVisible() && allowHorizontalScroll)
|
||||||
|
|
||||||
checkLastMediaChanged()
|
checkLastMediaChanged()
|
||||||
if (mLastDrawnHashCode == 0)
|
|
||||||
mLastDrawnHashCode = media.hashCode()
|
|
||||||
|
|
||||||
if (media.hashCode() == mMedia.hashCode() && media.hashCode() == mLastDrawnHashCode)
|
if (media.hashCode() == mMedia.hashCode() && media.hashCode() == mLastDrawnHashCode) {
|
||||||
return
|
return
|
||||||
|
}
|
||||||
|
|
||||||
mLastDrawnHashCode = media.hashCode()
|
mLastDrawnHashCode = media.hashCode()
|
||||||
mMedia = media
|
mMedia = media
|
||||||
|
|
Loading…
Reference in a new issue