mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
fix: hide the thumbnail card on fragments other than MediaDetailFragment
This commit is contained in:
parent
e15d8b156d
commit
9002978292
1 changed files with 5 additions and 0 deletions
|
|
@ -387,6 +387,11 @@ class UploadActivity : BaseActivity(), UploadContract.View, UploadBaseFragment.C
|
|||
override fun onUploadMediaDeleted(index: Int) {
|
||||
fragments!!.removeAt(index) //Remove the corresponding fragment
|
||||
uploadableFiles.removeAt(index) //Remove the files from the list
|
||||
|
||||
if(fragments!![currentSelectedPosition] !is UploadMediaDetailFragment) {
|
||||
// Should hide the top card current fragment is not the media detail fragment
|
||||
showHideTopCard(false)
|
||||
}
|
||||
thumbnailsAdapter!!.notifyItemRemoved(index) //Notify the thumbnails adapter
|
||||
uploadImagesAdapter!!.notifyDataSetChanged() //Notify the ViewPager
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue