Revert "[TMP] Get widgets / stickers working again"
This reverts commit c47b9ee64d1d760703ade0e5612dfb2c817fd58e.
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
|
* Views
|
||||||
* ========================================================================================== */
|
* ========================================================================================== */
|
||||||
|
@ -92,7 +92,7 @@ class WidgetFragment :
|
|||||||
if (fragmentArgs.kind.isAdmin()) {
|
if (fragmentArgs.kind.isAdmin()) {
|
||||||
viewModel.getPostAPIMediator().setWebView(views.widgetWebView)
|
viewModel.getPostAPIMediator().setWebView(views.widgetWebView)
|
||||||
}
|
}
|
||||||
viewModel.oldObserveViewEvents {
|
viewModel.observeViewEvents {
|
||||||
Timber.v("Observed view events: $it")
|
Timber.v("Observed view events: $it")
|
||||||
when (it) {
|
when (it) {
|
||||||
is WidgetViewEvents.DisplayTerms -> displayTerms(it)
|
is WidgetViewEvents.DisplayTerms -> displayTerms(it)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user