Revert "[TMP] Get widgets / stickers working again"
This reverts commit c47b9ee64d
.
This commit is contained in:
parent
1e3b77824e
commit
2756877d5b
|
@ -291,17 +291,6 @@ abstract class VectorBaseFragment<VB : ViewBinding> : Fragment(), MavericksView
|
|||
}
|
||||
}
|
||||
|
||||
// SC-TODO: this is the pre-v1.5.18 implementation of observeViewEvents, to fix custom widgets. Revert me once upstream implements a fix.
|
||||
protected fun <T : VectorViewEvents> VectorViewModel<*, *, T>.oldObserveViewEvents(observer: (T) -> Unit) {
|
||||
val tag = this@VectorBaseFragment::class.simpleName.toString()
|
||||
viewEvents
|
||||
.stream(tag)
|
||||
.onEach {
|
||||
observer(it)
|
||||
}
|
||||
.launchIn(viewLifecycleOwner.lifecycleScope)
|
||||
}
|
||||
|
||||
/* ==========================================================================================
|
||||
* Views
|
||||
* ========================================================================================== */
|
||||
|
|
|
@ -92,7 +92,7 @@ class WidgetFragment :
|
|||
if (fragmentArgs.kind.isAdmin()) {
|
||||
viewModel.getPostAPIMediator().setWebView(views.widgetWebView)
|
||||
}
|
||||
viewModel.oldObserveViewEvents {
|
||||
viewModel.observeViewEvents {
|
||||
Timber.v("Observed view events: $it")
|
||||
when (it) {
|
||||
is WidgetViewEvents.DisplayTerms -> displayTerms(it)
|
||||
|
|
Loading…
Reference in New Issue