Merge pull request #4592 from vector-im/feature/aris/epoxy_controller_init_improvement
Feature/aris/epoxy controller init improvement
This commit is contained in:
commit
02a609164c
|
@ -0,0 +1 @@
|
||||||
|
Remove requestModelBuild() from epoxy Controllers init{} block
|
|
@ -41,10 +41,6 @@ class ContactsBookController @Inject constructor(
|
||||||
|
|
||||||
var callback: Callback? = null
|
var callback: Callback? = null
|
||||||
|
|
||||||
init {
|
|
||||||
requestModelBuild()
|
|
||||||
}
|
|
||||||
|
|
||||||
fun setData(state: ContactsBookViewState) {
|
fun setData(state: ContactsBookViewState) {
|
||||||
this.state = state
|
this.state = state
|
||||||
requestModelBuild()
|
requestModelBuild()
|
||||||
|
|
|
@ -26,10 +26,6 @@ class RoomDevToolRootController @Inject constructor(
|
||||||
private val stringProvider: StringProvider
|
private val stringProvider: StringProvider
|
||||||
) : EpoxyController() {
|
) : EpoxyController() {
|
||||||
|
|
||||||
init {
|
|
||||||
requestModelBuild()
|
|
||||||
}
|
|
||||||
|
|
||||||
var interactionListener: DevToolsInteractionListener? = null
|
var interactionListener: DevToolsInteractionListener? = null
|
||||||
|
|
||||||
override fun buildModels() {
|
override fun buildModels() {
|
||||||
|
|
|
@ -30,12 +30,6 @@ class BreadcrumbsController @Inject constructor(
|
||||||
|
|
||||||
private var viewState: BreadcrumbsViewState? = null
|
private var viewState: BreadcrumbsViewState? = null
|
||||||
|
|
||||||
init {
|
|
||||||
// We are requesting a model build directly as the first build of epoxy is on the main thread.
|
|
||||||
// It avoids to build the whole list of breadcrumbs on the main thread.
|
|
||||||
requestModelBuild()
|
|
||||||
}
|
|
||||||
|
|
||||||
fun update(viewState: BreadcrumbsViewState) {
|
fun update(viewState: BreadcrumbsViewState) {
|
||||||
this.viewState = viewState
|
this.viewState = viewState
|
||||||
requestModelBuild()
|
requestModelBuild()
|
||||||
|
|
|
@ -46,10 +46,6 @@ class DevicesController @Inject constructor(private val errorFormatter: ErrorFor
|
||||||
var callback: Callback? = null
|
var callback: Callback? = null
|
||||||
private var viewState: DevicesViewState? = null
|
private var viewState: DevicesViewState? = null
|
||||||
|
|
||||||
init {
|
|
||||||
requestModelBuild()
|
|
||||||
}
|
|
||||||
|
|
||||||
fun update(viewState: DevicesViewState) {
|
fun update(viewState: DevicesViewState) {
|
||||||
this.viewState = viewState
|
this.viewState = viewState
|
||||||
requestModelBuild()
|
requestModelBuild()
|
||||||
|
|
|
@ -31,10 +31,6 @@ class IgnoredUsersController @Inject constructor(private val stringProvider: Str
|
||||||
var callback: Callback? = null
|
var callback: Callback? = null
|
||||||
private var viewState: IgnoredUsersViewState? = null
|
private var viewState: IgnoredUsersViewState? = null
|
||||||
|
|
||||||
init {
|
|
||||||
requestModelBuild()
|
|
||||||
}
|
|
||||||
|
|
||||||
fun update(viewState: IgnoredUsersViewState) {
|
fun update(viewState: IgnoredUsersViewState) {
|
||||||
this.viewState = viewState
|
this.viewState = viewState
|
||||||
requestModelBuild()
|
requestModelBuild()
|
||||||
|
|
|
@ -45,12 +45,6 @@ class SoftLogoutController @Inject constructor(
|
||||||
|
|
||||||
private var viewState: SoftLogoutViewState? = null
|
private var viewState: SoftLogoutViewState? = null
|
||||||
|
|
||||||
init {
|
|
||||||
// We are requesting a model build directly as the first build of epoxy is on the main thread.
|
|
||||||
// It avoids to build the whole list of breadcrumbs on the main thread.
|
|
||||||
requestModelBuild()
|
|
||||||
}
|
|
||||||
|
|
||||||
fun update(viewState: SoftLogoutViewState) {
|
fun update(viewState: SoftLogoutViewState) {
|
||||||
this.viewState = viewState
|
this.viewState = viewState
|
||||||
requestModelBuild()
|
requestModelBuild()
|
||||||
|
|
|
@ -47,10 +47,6 @@ class SpaceSummaryController @Inject constructor(
|
||||||
|
|
||||||
private val subSpaceComparator: Comparator<SpaceChildInfo> = compareBy<SpaceChildInfo> { it.order }.thenBy { it.childRoomId }
|
private val subSpaceComparator: Comparator<SpaceChildInfo> = compareBy<SpaceChildInfo> { it.order }.thenBy { it.childRoomId }
|
||||||
|
|
||||||
init {
|
|
||||||
requestModelBuild()
|
|
||||||
}
|
|
||||||
|
|
||||||
fun update(viewState: SpaceListViewState) {
|
fun update(viewState: SpaceListViewState) {
|
||||||
this.viewState = viewState
|
this.viewState = viewState
|
||||||
requestModelBuild()
|
requestModelBuild()
|
||||||
|
|
Loading…
Reference in New Issue