Loading presentation/src/main/java/com/moez/QKSMS/common/widget/GroupAvatarView.kt +3 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,9 @@ import com.moez.QKSMS.R import com.moez.QKSMS.model.Recipient import kotlinx.android.synthetic.main.group_avatar_view.view.* class GroupAvatarView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) : ConstraintLayout(context, attrs) { class GroupAvatarView @JvmOverloads constructor( context: Context, attrs: AttributeSet? = null ) : ConstraintLayout(context, attrs) { var contacts: List<Recipient> = ArrayList() set(value) { Loading presentation/src/main/java/com/moez/QKSMS/feature/compose/ComposeViewModel.kt +7 −1 Original line number Diff line number Diff line Loading @@ -324,7 +324,13 @@ class ComposeViewModel @Inject constructor( // Update the list of selected contacts when a new contact is selected or an existing one is deselected Observable.merge( view.chipDeletedIntent.doOnNext { contact -> contactsReducer.onNext { contacts -> contacts.filterNot { it == contact } } contactsReducer.onNext { contacts -> val result = contacts.filterNot { it == contact } if (result.isEmpty()) { newState { copy(searching = true) } } result } }, view.chipSelectedIntent.doOnNext { composeItem -> newState { copy(searching = false) } Loading Loading
presentation/src/main/java/com/moez/QKSMS/common/widget/GroupAvatarView.kt +3 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,9 @@ import com.moez.QKSMS.R import com.moez.QKSMS.model.Recipient import kotlinx.android.synthetic.main.group_avatar_view.view.* class GroupAvatarView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) : ConstraintLayout(context, attrs) { class GroupAvatarView @JvmOverloads constructor( context: Context, attrs: AttributeSet? = null ) : ConstraintLayout(context, attrs) { var contacts: List<Recipient> = ArrayList() set(value) { Loading
presentation/src/main/java/com/moez/QKSMS/feature/compose/ComposeViewModel.kt +7 −1 Original line number Diff line number Diff line Loading @@ -324,7 +324,13 @@ class ComposeViewModel @Inject constructor( // Update the list of selected contacts when a new contact is selected or an existing one is deselected Observable.merge( view.chipDeletedIntent.doOnNext { contact -> contactsReducer.onNext { contacts -> contacts.filterNot { it == contact } } contactsReducer.onNext { contacts -> val result = contacts.filterNot { it == contact } if (result.isEmpty()) { newState { copy(searching = true) } } result } }, view.chipSelectedIntent.doOnNext { composeItem -> newState { copy(searching = false) } Loading