mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 22:47:59 +01:00
recreate the MediaAdapter in some extra cases
This commit is contained in:
parent
d69351fa99
commit
92fc3ec90c
2 changed files with 6 additions and 1 deletions
|
@ -47,7 +47,7 @@ ext {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.simplemobiletools:commons:4.2.13'
|
||||
implementation 'com.simplemobiletools:commons:4.3.0'
|
||||
implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.0'
|
||||
implementation 'com.android.support:multidex:1.0.3'
|
||||
implementation 'it.sephiroth.android.exif:library:1.0.1'
|
||||
|
|
|
@ -403,6 +403,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
|||
private fun showSortingDialog() {
|
||||
ChangeSortingDialog(this, false, !config.showAll, mPath) {
|
||||
mLoadedInitialPhotos = false
|
||||
media_grid.adapter = null
|
||||
getMedia()
|
||||
}
|
||||
}
|
||||
|
@ -411,6 +412,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
|||
FilterMediaDialog(this) {
|
||||
mLoadedInitialPhotos = false
|
||||
media_refresh_layout.isRefreshing = true
|
||||
media_grid.adapter = null
|
||||
getMedia()
|
||||
}
|
||||
}
|
||||
|
@ -443,6 +445,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
|||
private fun showGroupByDialog() {
|
||||
ChangeGroupingDialog(this, mShowAll, mPath) {
|
||||
mLoadedInitialPhotos = false
|
||||
media_grid.adapter = null
|
||||
getMedia()
|
||||
}
|
||||
}
|
||||
|
@ -651,6 +654,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
|||
config.mediaColumnCnt = ++(media_grid.layoutManager as MyGridLayoutManager).spanCount
|
||||
invalidateOptionsMenu()
|
||||
media_grid.adapter?.notifyDataSetChanged()
|
||||
measureRecyclerViewContent(mMedia)
|
||||
}
|
||||
|
||||
private fun reduceColumnCount() {
|
||||
|
@ -659,6 +663,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
|||
config.mediaColumnCnt = --(media_grid.layoutManager as MyGridLayoutManager).spanCount
|
||||
invalidateOptionsMenu()
|
||||
media_grid.adapter?.notifyDataSetChanged()
|
||||
measureRecyclerViewContent(mMedia)
|
||||
}
|
||||
|
||||
private fun isSetWallpaperIntent() = intent.getBooleanExtra(SET_WALLPAPER_INTENT, false)
|
||||
|
|
Loading…
Reference in a new issue