Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feature/BDBD-328' into stage/san…
Browse files Browse the repository at this point in the history
…dbox
  • Loading branch information
minseonglove committed Jul 6, 2022
2 parents c039653 + 6f566de commit 6ed7277
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,11 @@ class ProductRegistrationViewModel @Inject constructor(

fun setUrlList(list: List<String>) {
viewModelScope.launch {
_urlList.emit(list.toMutableList())
adapter.submitList(list)
if (list.isNotEmpty()) {
if (list.isNotEmpty() && !list.contains(urlList.value[0])) {
adapter.notifyItemChanged(1)
}
_urlList.emit(list.toMutableList())
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.fakedevelopers.bidderbidder.ui.product_registration.album_list

import android.content.ContentUris
import android.net.Uri
import android.os.Bundle
import android.provider.MediaStore
import android.view.LayoutInflater
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,12 @@ class AlbumListViewModel : ViewModel() {

fun setSelectedImage(list: List<String>) {
viewModelScope.launch {
_selectedImageList.emit(list.toMutableList())
selectedPictureAdapter.submitList(list.toMutableList())
if (list.isNotEmpty()) {
if (list.isNotEmpty() && !list.contains(selectedImageList.value[0])) {
selectedPictureAdapter.notifyItemChanged(1)
}
albumListAdapter.notifyDataSetChanged()
_selectedImageList.emit(list.toMutableList())
}
}

Expand Down

0 comments on commit 6ed7277

Please sign in to comment.