Mavericks 2: replace asyncSubscribe by onAsync
This commit is contained in:
parent
96b5d1c96b
commit
43c75bdae7
|
@ -138,7 +138,7 @@ class VectorCallActivity : VectorBaseActivity<ActivityCallBinding>(), CallContro
|
|||
renderState(it)
|
||||
}
|
||||
|
||||
callViewModel.asyncSubscribe(VectorCallViewState::callState) {
|
||||
callViewModel.onAsync(VectorCallViewState::callState) {
|
||||
if (it is CallState.Ended) {
|
||||
handleCallEnded(it)
|
||||
}
|
||||
|
|
|
@ -269,7 +269,7 @@ class RoomDetailViewModel @AssistedInject constructor(
|
|||
copy(activeRoomWidgets = widgets)
|
||||
}
|
||||
|
||||
asyncSubscribe(RoomDetailViewState::activeRoomWidgets) { widgets ->
|
||||
onAsync(RoomDetailViewState::activeRoomWidgets) { widgets ->
|
||||
setState {
|
||||
val jitsiWidget = widgets.firstOrNull { it.type == WidgetType.Jitsi }
|
||||
val jitsiConfId = jitsiWidget?.let {
|
||||
|
@ -1597,7 +1597,7 @@ class RoomDetailViewModel @AssistedInject constructor(
|
|||
}
|
||||
|
||||
private fun observeSummaryState() {
|
||||
asyncSubscribe(RoomDetailViewState::asyncRoomSummary) { summary ->
|
||||
onAsync(RoomDetailViewState::asyncRoomSummary) { summary ->
|
||||
setState {
|
||||
val typingMessage = typingHelper.getTypingMessage(summary.typingUsers)
|
||||
copy(
|
||||
|
|
|
@ -65,7 +65,7 @@ class RoomWidgetsBottomSheet :
|
|||
views.bottomSheetTitle.textSize = 20f
|
||||
views.bottomSheetTitle.setTextColor(colorProvider.getColorFromAttribute(R.attr.vctr_content_primary))
|
||||
epoxyController.listener = this
|
||||
roomDetailViewModel.asyncSubscribe(RoomDetailViewState::activeRoomWidgets) {
|
||||
roomDetailViewModel.onAsync(RoomDetailViewState::activeRoomWidgets) {
|
||||
epoxyController.setData(it)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -101,7 +101,7 @@ class WidgetViewModel @AssistedInject constructor(@Assisted val initialState: Wi
|
|||
}
|
||||
|
||||
private fun subscribeToWidget() {
|
||||
asyncSubscribe(WidgetViewState::asyncWidget) {
|
||||
onAsync(WidgetViewState::asyncWidget) {
|
||||
setState { copy(widgetName = it.name) }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue