Mavericks 2: replace MvRxViewModelFactory by MavericksViewModelFactory

This commit is contained in:
ganfra 2021-10-01 17:11:53 +02:00
parent d63e1ecfea
commit 606cddc826
88 changed files with 174 additions and 175 deletions

View file

@ -2,7 +2,7 @@ package ${escapeKotlinIdentifiers(packageName)}
import com.airbnb.mvrx.ActivityViewModelContext import com.airbnb.mvrx.ActivityViewModelContext
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
import dagger.assisted.AssistedInject import dagger.assisted.AssistedInject
@ -27,7 +27,7 @@ class ${viewModelClass} @AssistedInject constructor(@Assisted initialState: ${vi
fun create(initialState: ${viewStateClass}): ${viewModelClass} fun create(initialState: ${viewStateClass}): ${viewModelClass}
} }
companion object : MvRxViewModelFactory<${viewModelClass}, ${viewStateClass}> { companion object : MavericksViewModelFactory<${viewModelClass}, ${viewStateClass}> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: ${viewStateClass}): ${viewModelClass}? { override fun create(viewModelContext: ViewModelContext, state: ${viewStateClass}): ${viewModelClass}? {

View file

@ -18,7 +18,7 @@ package im.vector.app.features.auth
import com.airbnb.mvrx.ActivityViewModelContext import com.airbnb.mvrx.ActivityViewModelContext
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory import dagger.assisted.AssistedFactory
@ -39,7 +39,7 @@ class ReAuthViewModel @AssistedInject constructor(
fun create(initialState: ReAuthState): ReAuthViewModel fun create(initialState: ReAuthState): ReAuthViewModel
} }
companion object : MvRxViewModelFactory<ReAuthViewModel, ReAuthState> { companion object : MavericksViewModelFactory<ReAuthViewModel, ReAuthState> {
override fun create(viewModelContext: ViewModelContext, state: ReAuthState): ReAuthViewModel? { override fun create(viewModelContext: ViewModelContext, state: ReAuthState): ReAuthViewModel? {
val factory = when (viewModelContext) { val factory = when (viewModelContext) {

View file

@ -19,7 +19,7 @@ package im.vector.app.features.call
import androidx.lifecycle.viewModelScope import androidx.lifecycle.viewModelScope
import com.airbnb.mvrx.Fail import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
@ -345,7 +345,7 @@ class VectorCallViewModel @AssistedInject constructor(
fun create(initialState: VectorCallViewState): VectorCallViewModel fun create(initialState: VectorCallViewState): VectorCallViewModel
} }
companion object : MvRxViewModelFactory<VectorCallViewModel, VectorCallViewState> { companion object : MavericksViewModelFactory<VectorCallViewModel, VectorCallViewState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: VectorCallViewState): VectorCallViewModel { override fun create(viewModelContext: ViewModelContext, state: VectorCallViewState): VectorCallViewModel {

View file

@ -18,7 +18,7 @@ package im.vector.app.features.call.conference
import androidx.lifecycle.viewModelScope import androidx.lifecycle.viewModelScope
import com.airbnb.mvrx.Fail import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.Uninitialized import com.airbnb.mvrx.Uninitialized
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
@ -140,7 +140,7 @@ class JitsiCallViewModel @AssistedInject constructor(
} }
} }
companion object : MvRxViewModelFactory<JitsiCallViewModel, JitsiCallViewState> { companion object : MavericksViewModelFactory<JitsiCallViewModel, JitsiCallViewState> {
const val ENABLE_VIDEO_OPTION = "ENABLE_VIDEO_OPTION" const val ENABLE_VIDEO_OPTION = "ENABLE_VIDEO_OPTION"

View file

@ -18,7 +18,7 @@ package im.vector.app.features.call.transfer
import androidx.lifecycle.viewModelScope import androidx.lifecycle.viewModelScope
import com.airbnb.mvrx.ActivityViewModelContext import com.airbnb.mvrx.ActivityViewModelContext
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory import dagger.assisted.AssistedFactory
@ -45,7 +45,7 @@ class CallTransferViewModel @AssistedInject constructor(@Assisted initialState:
fun create(initialState: CallTransferViewState): CallTransferViewModel fun create(initialState: CallTransferViewState): CallTransferViewModel
} }
companion object : MvRxViewModelFactory<CallTransferViewModel, CallTransferViewState> { companion object : MavericksViewModelFactory<CallTransferViewModel, CallTransferViewState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: CallTransferViewState): CallTransferViewModel? { override fun create(viewModelContext: ViewModelContext, state: CallTransferViewState): CallTransferViewModel? {

View file

@ -20,7 +20,7 @@ import androidx.lifecycle.viewModelScope
import com.airbnb.mvrx.ActivityViewModelContext import com.airbnb.mvrx.ActivityViewModelContext
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
@ -49,7 +49,7 @@ class ContactsBookViewModel @AssistedInject constructor(@Assisted
fun create(initialState: ContactsBookViewState): ContactsBookViewModel fun create(initialState: ContactsBookViewState): ContactsBookViewModel
} }
companion object : MvRxViewModelFactory<ContactsBookViewModel, ContactsBookViewState> { companion object : MavericksViewModelFactory<ContactsBookViewModel, ContactsBookViewState> {
override fun create(viewModelContext: ViewModelContext, state: ContactsBookViewState): ContactsBookViewModel? { override fun create(viewModelContext: ViewModelContext, state: ContactsBookViewState): ContactsBookViewModel? {
val factory = when (viewModelContext) { val factory = when (viewModelContext) {

View file

@ -20,7 +20,7 @@ import androidx.lifecycle.viewModelScope
import com.airbnb.mvrx.ActivityViewModelContext import com.airbnb.mvrx.ActivityViewModelContext
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
@ -49,7 +49,7 @@ class CreateDirectRoomViewModel @AssistedInject constructor(@Assisted
fun create(initialState: CreateDirectRoomViewState): CreateDirectRoomViewModel fun create(initialState: CreateDirectRoomViewState): CreateDirectRoomViewModel
} }
companion object : MvRxViewModelFactory<CreateDirectRoomViewModel, CreateDirectRoomViewState> { companion object : MavericksViewModelFactory<CreateDirectRoomViewModel, CreateDirectRoomViewState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: CreateDirectRoomViewState): CreateDirectRoomViewModel? { override fun create(viewModelContext: ViewModelContext, state: CreateDirectRoomViewState): CreateDirectRoomViewModel? {

View file

@ -18,7 +18,7 @@ package im.vector.app.features.crypto.keysbackup.settings
import com.airbnb.mvrx.ActivityViewModelContext import com.airbnb.mvrx.ActivityViewModelContext
import com.airbnb.mvrx.Fail import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.Uninitialized import com.airbnb.mvrx.Uninitialized
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
@ -45,7 +45,7 @@ class KeysBackupSettingsViewModel @AssistedInject constructor(@Assisted initialS
fun create(initialState: KeysBackupSettingViewState): KeysBackupSettingsViewModel fun create(initialState: KeysBackupSettingViewState): KeysBackupSettingsViewModel
} }
companion object : MvRxViewModelFactory<KeysBackupSettingsViewModel, KeysBackupSettingViewState> { companion object : MavericksViewModelFactory<KeysBackupSettingsViewModel, KeysBackupSettingViewState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: KeysBackupSettingViewState): KeysBackupSettingsViewModel? { override fun create(viewModelContext: ViewModelContext, state: KeysBackupSettingViewState): KeysBackupSettingsViewModel? {

View file

@ -22,7 +22,7 @@ import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MvRx import com.airbnb.mvrx.MvRx
import com.airbnb.mvrx.MavericksState import com.airbnb.mvrx.MavericksState
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.Uninitialized import com.airbnb.mvrx.Uninitialized
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
@ -322,7 +322,7 @@ class SharedSecureStorageViewModel @AssistedInject constructor(
_viewEvents.post(SharedSecureStorageViewEvent.Dismiss) _viewEvents.post(SharedSecureStorageViewEvent.Dismiss)
} }
companion object : MvRxViewModelFactory<SharedSecureStorageViewModel, SharedSecureStorageViewState> { companion object : MavericksViewModelFactory<SharedSecureStorageViewModel, SharedSecureStorageViewState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: SharedSecureStorageViewState): SharedSecureStorageViewModel? { override fun create(viewModelContext: ViewModelContext, state: SharedSecureStorageViewState): SharedSecureStorageViewModel? {

View file

@ -20,7 +20,7 @@ import androidx.lifecycle.viewModelScope
import com.airbnb.mvrx.Fail import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.Uninitialized import com.airbnb.mvrx.Uninitialized
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
@ -552,7 +552,7 @@ class BootstrapSharedViewModel @AssistedInject constructor(
// Companion, view model assisted creation // Companion, view model assisted creation
// ====================================== // ======================================
companion object : MvRxViewModelFactory<BootstrapSharedViewModel, BootstrapViewState> { companion object : MavericksViewModelFactory<BootstrapSharedViewModel, BootstrapViewState> {
override fun create(viewModelContext: ViewModelContext, state: BootstrapViewState): BootstrapSharedViewModel? { override fun create(viewModelContext: ViewModelContext, state: BootstrapViewState): BootstrapSharedViewModel? {
val fragment: BootstrapBottomSheet = (viewModelContext as FragmentViewModelContext).fragment() val fragment: BootstrapBottomSheet = (viewModelContext as FragmentViewModelContext).fragment()

View file

@ -21,7 +21,7 @@ import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MavericksState import com.airbnb.mvrx.MavericksState
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.Uninitialized import com.airbnb.mvrx.Uninitialized
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
@ -223,7 +223,7 @@ class VerificationBottomSheetViewModel @AssistedInject constructor(
_viewEvents.post(VerificationBottomSheetViewEvents.GoToSettings) _viewEvents.post(VerificationBottomSheetViewEvents.GoToSettings)
} }
companion object : MvRxViewModelFactory<VerificationBottomSheetViewModel, VerificationBottomSheetViewState> { companion object : MavericksViewModelFactory<VerificationBottomSheetViewModel, VerificationBottomSheetViewState> {
override fun create(viewModelContext: ViewModelContext, state: VerificationBottomSheetViewState): VerificationBottomSheetViewModel? { override fun create(viewModelContext: ViewModelContext, state: VerificationBottomSheetViewState): VerificationBottomSheetViewModel? {
val fragment: VerificationBottomSheet = (viewModelContext as FragmentViewModelContext).fragment() val fragment: VerificationBottomSheet = (viewModelContext as FragmentViewModelContext).fragment()

View file

@ -17,7 +17,7 @@ package im.vector.app.features.crypto.verification.choose
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.MavericksState import com.airbnb.mvrx.MavericksState
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
import dagger.assisted.AssistedInject import dagger.assisted.AssistedInject
@ -94,7 +94,7 @@ class VerificationChooseMethodViewModel @AssistedInject constructor(
super.onCleared() super.onCleared()
} }
companion object : MvRxViewModelFactory<VerificationChooseMethodViewModel, VerificationChooseMethodViewState> { companion object : MavericksViewModelFactory<VerificationChooseMethodViewModel, VerificationChooseMethodViewState> {
override fun create(viewModelContext: ViewModelContext, state: VerificationChooseMethodViewState): VerificationChooseMethodViewModel? { override fun create(viewModelContext: ViewModelContext, state: VerificationChooseMethodViewState): VerificationChooseMethodViewModel? {
val fragment: VerificationChooseMethodFragment = (viewModelContext as FragmentViewModelContext).fragment() val fragment: VerificationChooseMethodFragment = (viewModelContext as FragmentViewModelContext).fragment()
return fragment.verificationChooseMethodViewModelFactory.create(state) return fragment.verificationChooseMethodViewModelFactory.create(state)

View file

@ -16,7 +16,7 @@
package im.vector.app.features.crypto.verification.conclusion package im.vector.app.features.crypto.verification.conclusion
import com.airbnb.mvrx.MavericksState import com.airbnb.mvrx.MavericksState
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import im.vector.app.core.platform.EmptyAction import im.vector.app.core.platform.EmptyAction
import im.vector.app.core.platform.EmptyViewEvents import im.vector.app.core.platform.EmptyViewEvents
@ -38,7 +38,7 @@ enum class ConclusionState {
class VerificationConclusionViewModel(initialState: VerificationConclusionViewState) class VerificationConclusionViewModel(initialState: VerificationConclusionViewState)
: VectorViewModel<VerificationConclusionViewState, EmptyAction, EmptyViewEvents>(initialState) { : VectorViewModel<VerificationConclusionViewState, EmptyAction, EmptyViewEvents>(initialState) {
companion object : MvRxViewModelFactory<VerificationConclusionViewModel, VerificationConclusionViewState> { companion object : MavericksViewModelFactory<VerificationConclusionViewModel, VerificationConclusionViewState> {
override fun initialState(viewModelContext: ViewModelContext): VerificationConclusionViewState? { override fun initialState(viewModelContext: ViewModelContext): VerificationConclusionViewState? {
val args = viewModelContext.args<VerificationConclusionFragment.Args>() val args = viewModelContext.args<VerificationConclusionFragment.Args>()

View file

@ -20,7 +20,7 @@ import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MavericksState import com.airbnb.mvrx.MavericksState
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.Uninitialized import com.airbnb.mvrx.Uninitialized
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
@ -155,7 +155,7 @@ class VerificationEmojiCodeViewModel @AssistedInject constructor(
fun create(initialState: VerificationEmojiCodeViewState): VerificationEmojiCodeViewModel fun create(initialState: VerificationEmojiCodeViewState): VerificationEmojiCodeViewModel
} }
companion object : MvRxViewModelFactory<VerificationEmojiCodeViewModel, VerificationEmojiCodeViewState> { companion object : MavericksViewModelFactory<VerificationEmojiCodeViewModel, VerificationEmojiCodeViewState> {
override fun create(viewModelContext: ViewModelContext, state: VerificationEmojiCodeViewState): VerificationEmojiCodeViewModel? { override fun create(viewModelContext: ViewModelContext, state: VerificationEmojiCodeViewState): VerificationEmojiCodeViewModel? {
val factory = (viewModelContext as FragmentViewModelContext).fragment<VerificationEmojiCodeFragment>().viewModelFactory val factory = (viewModelContext as FragmentViewModelContext).fragment<VerificationEmojiCodeFragment>().viewModelFactory

View file

@ -21,7 +21,7 @@ import com.airbnb.mvrx.ActivityViewModelContext
import com.airbnb.mvrx.Fail import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import com.squareup.moshi.Types import com.squareup.moshi.Types
@ -56,7 +56,7 @@ class RoomDevToolViewModel @AssistedInject constructor(
fun create(initialState: RoomDevToolViewState): RoomDevToolViewModel fun create(initialState: RoomDevToolViewState): RoomDevToolViewModel
} }
companion object : MvRxViewModelFactory<RoomDevToolViewModel, RoomDevToolViewState> { companion object : MavericksViewModelFactory<RoomDevToolViewModel, RoomDevToolViewState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: RoomDevToolViewState): RoomDevToolViewModel { override fun create(viewModelContext: ViewModelContext, state: RoomDevToolViewState): RoomDevToolViewModel {

View file

@ -20,7 +20,7 @@ import com.airbnb.mvrx.Async
import com.airbnb.mvrx.Fail import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.Uninitialized import com.airbnb.mvrx.Uninitialized
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
@ -47,7 +47,7 @@ class DiscoverySettingsViewModel @AssistedInject constructor(
fun create(initialState: DiscoverySettingsState): DiscoverySettingsViewModel fun create(initialState: DiscoverySettingsState): DiscoverySettingsViewModel
} }
companion object : MvRxViewModelFactory<DiscoverySettingsViewModel, DiscoverySettingsState> { companion object : MavericksViewModelFactory<DiscoverySettingsViewModel, DiscoverySettingsState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: DiscoverySettingsState): DiscoverySettingsViewModel? { override fun create(viewModelContext: ViewModelContext, state: DiscoverySettingsState): DiscoverySettingsViewModel? {

View file

@ -17,7 +17,7 @@ package im.vector.app.features.discovery.change
import androidx.lifecycle.viewModelScope import androidx.lifecycle.viewModelScope
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
import dagger.assisted.AssistedInject import dagger.assisted.AssistedInject
@ -46,7 +46,7 @@ class SetIdentityServerViewModel @AssistedInject constructor(
fun create(initialState: SetIdentityServerState): SetIdentityServerViewModel fun create(initialState: SetIdentityServerState): SetIdentityServerViewModel
} }
companion object : MvRxViewModelFactory<SetIdentityServerViewModel, SetIdentityServerState> { companion object : MavericksViewModelFactory<SetIdentityServerViewModel, SetIdentityServerState> {
override fun initialState(viewModelContext: ViewModelContext): SetIdentityServerState? { override fun initialState(viewModelContext: ViewModelContext): SetIdentityServerState? {
val session = (viewModelContext.activity as HasScreenInjector).injector().activeSessionHolder().getActiveSession() val session = (viewModelContext.activity as HasScreenInjector).injector().activeSessionHolder().getActiveSession()

View file

@ -18,7 +18,7 @@ package im.vector.app.features.home
import androidx.lifecycle.viewModelScope import androidx.lifecycle.viewModelScope
import com.airbnb.mvrx.MvRx import com.airbnb.mvrx.MvRx
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory import dagger.assisted.AssistedFactory
@ -67,7 +67,7 @@ class HomeActivityViewModel @AssistedInject constructor(
fun create(initialState: HomeActivityViewState, args: HomeActivityArgs): HomeActivityViewModel fun create(initialState: HomeActivityViewState, args: HomeActivityArgs): HomeActivityViewModel
} }
companion object : MvRxViewModelFactory<HomeActivityViewModel, HomeActivityViewState> { companion object : MavericksViewModelFactory<HomeActivityViewModel, HomeActivityViewState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: HomeActivityViewState): HomeActivityViewModel? { override fun create(viewModelContext: ViewModelContext, state: HomeActivityViewState): HomeActivityViewModel? {

View file

@ -18,7 +18,7 @@ package im.vector.app.features.home
import androidx.lifecycle.viewModelScope import androidx.lifecycle.viewModelScope
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory import dagger.assisted.AssistedFactory
@ -72,7 +72,7 @@ class HomeDetailViewModel @AssistedInject constructor(@Assisted initialState: Ho
fun create(initialState: HomeDetailViewState): HomeDetailViewModel fun create(initialState: HomeDetailViewState): HomeDetailViewModel
} }
companion object : MvRxViewModelFactory<HomeDetailViewModel, HomeDetailViewState> { companion object : MavericksViewModelFactory<HomeDetailViewModel, HomeDetailViewState> {
override fun initialState(viewModelContext: ViewModelContext): HomeDetailViewState? { override fun initialState(viewModelContext: ViewModelContext): HomeDetailViewState? {
val uiStateRepository = (viewModelContext.activity as HasScreenInjector).injector().uiStateRepository() val uiStateRepository = (viewModelContext.activity as HasScreenInjector).injector().uiStateRepository()

View file

@ -19,7 +19,7 @@ package im.vector.app.features.home
import com.airbnb.mvrx.ActivityViewModelContext import com.airbnb.mvrx.ActivityViewModelContext
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.MavericksState import com.airbnb.mvrx.MavericksState
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory import dagger.assisted.AssistedFactory
@ -76,7 +76,7 @@ class PromoteRestrictedViewModel @AssistedInject constructor(
fun create(initialState: ActiveSpaceViewState): PromoteRestrictedViewModel fun create(initialState: ActiveSpaceViewState): PromoteRestrictedViewModel
} }
companion object : MvRxViewModelFactory<PromoteRestrictedViewModel, ActiveSpaceViewState> { companion object : MavericksViewModelFactory<PromoteRestrictedViewModel, ActiveSpaceViewState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: ActiveSpaceViewState): PromoteRestrictedViewModel? { override fun create(viewModelContext: ViewModelContext, state: ActiveSpaceViewState): PromoteRestrictedViewModel? {

View file

@ -20,7 +20,7 @@ import com.airbnb.mvrx.ActivityViewModelContext
import com.airbnb.mvrx.Async import com.airbnb.mvrx.Async
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.MavericksState import com.airbnb.mvrx.MavericksState
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.Uninitialized import com.airbnb.mvrx.Uninitialized
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
@ -70,7 +70,7 @@ class UnknownDeviceDetectorSharedViewModel @AssistedInject constructor(@Assisted
fun create(initialState: UnknownDevicesState): UnknownDeviceDetectorSharedViewModel fun create(initialState: UnknownDevicesState): UnknownDeviceDetectorSharedViewModel
} }
companion object : MvRxViewModelFactory<UnknownDeviceDetectorSharedViewModel, UnknownDevicesState> { companion object : MavericksViewModelFactory<UnknownDeviceDetectorSharedViewModel, UnknownDevicesState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: UnknownDevicesState): UnknownDeviceDetectorSharedViewModel? { override fun create(viewModelContext: ViewModelContext, state: UnknownDevicesState): UnknownDeviceDetectorSharedViewModel? {

View file

@ -19,7 +19,7 @@ package im.vector.app.features.home
import com.airbnb.mvrx.ActivityViewModelContext import com.airbnb.mvrx.ActivityViewModelContext
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.MavericksState import com.airbnb.mvrx.MavericksState
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory import dagger.assisted.AssistedFactory
@ -65,7 +65,7 @@ class UnreadMessagesSharedViewModel @AssistedInject constructor(@Assisted initia
fun create(initialState: UnreadMessagesState): UnreadMessagesSharedViewModel fun create(initialState: UnreadMessagesState): UnreadMessagesSharedViewModel
} }
companion object : MvRxViewModelFactory<UnreadMessagesSharedViewModel, UnreadMessagesState> { companion object : MavericksViewModelFactory<UnreadMessagesSharedViewModel, UnreadMessagesState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: UnreadMessagesState): UnreadMessagesSharedViewModel? { override fun create(viewModelContext: ViewModelContext, state: UnreadMessagesState): UnreadMessagesSharedViewModel? {

View file

@ -17,7 +17,7 @@
package im.vector.app.features.home.room.breadcrumbs package im.vector.app.features.home.room.breadcrumbs
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
import dagger.assisted.AssistedInject import dagger.assisted.AssistedInject
@ -41,7 +41,7 @@ class BreadcrumbsViewModel @AssistedInject constructor(@Assisted initialState: B
fun create(initialState: BreadcrumbsViewState): BreadcrumbsViewModel fun create(initialState: BreadcrumbsViewState): BreadcrumbsViewModel
} }
companion object : MvRxViewModelFactory<BreadcrumbsViewModel, BreadcrumbsViewState> { companion object : MavericksViewModelFactory<BreadcrumbsViewModel, BreadcrumbsViewState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: BreadcrumbsViewState): BreadcrumbsViewModel? { override fun create(viewModelContext: ViewModelContext, state: BreadcrumbsViewState): BreadcrumbsViewModel? {

View file

@ -23,7 +23,7 @@ import com.airbnb.mvrx.Async
import com.airbnb.mvrx.Fail import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.Uninitialized import com.airbnb.mvrx.Uninitialized
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
@ -165,7 +165,7 @@ class RoomDetailViewModel @AssistedInject constructor(
fun create(initialState: RoomDetailViewState): RoomDetailViewModel fun create(initialState: RoomDetailViewState): RoomDetailViewModel
} }
companion object : MvRxViewModelFactory<RoomDetailViewModel, RoomDetailViewState> { companion object : MavericksViewModelFactory<RoomDetailViewModel, RoomDetailViewState> {
const val PAGINATION_COUNT = 50 const val PAGINATION_COUNT = 50

View file

@ -20,7 +20,7 @@ import androidx.lifecycle.viewModelScope
import com.airbnb.mvrx.Fail import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
@ -50,7 +50,7 @@ class SearchViewModel @AssistedInject constructor(
fun create(initialState: SearchViewState): SearchViewModel fun create(initialState: SearchViewState): SearchViewModel
} }
companion object : MvRxViewModelFactory<SearchViewModel, SearchViewState> { companion object : MavericksViewModelFactory<SearchViewModel, SearchViewState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: SearchViewState): SearchViewModel? { override fun create(viewModelContext: ViewModelContext, state: SearchViewState): SearchViewModel? {

View file

@ -16,7 +16,7 @@
package im.vector.app.features.home.room.detail.timeline.action package im.vector.app.features.home.room.detail.timeline.action
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import dagger.Lazy import dagger.Lazy
import dagger.assisted.Assisted import dagger.assisted.Assisted
@ -89,7 +89,7 @@ class MessageActionsViewModel @AssistedInject constructor(@Assisted
fun create(initialState: MessageActionState): MessageActionsViewModel fun create(initialState: MessageActionState): MessageActionsViewModel
} }
companion object : MvRxViewModelFactory<MessageActionsViewModel, MessageActionState> { companion object : MavericksViewModelFactory<MessageActionsViewModel, MessageActionState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: MessageActionState): MessageActionsViewModel? { override fun create(viewModelContext: ViewModelContext, state: MessageActionState): MessageActionsViewModel? {
val fragment: MessageActionsBottomSheet = (viewModelContext as FragmentViewModelContext).fragment() val fragment: MessageActionsBottomSheet = (viewModelContext as FragmentViewModelContext).fragment()

View file

@ -19,7 +19,7 @@ import androidx.lifecycle.viewModelScope
import com.airbnb.mvrx.Fail import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
@ -51,7 +51,7 @@ class ViewEditHistoryViewModel @AssistedInject constructor(
fun create(initialState: ViewEditHistoryViewState): ViewEditHistoryViewModel fun create(initialState: ViewEditHistoryViewState): ViewEditHistoryViewModel
} }
companion object : MvRxViewModelFactory<ViewEditHistoryViewModel, ViewEditHistoryViewState> { companion object : MavericksViewModelFactory<ViewEditHistoryViewModel, ViewEditHistoryViewState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: ViewEditHistoryViewState): ViewEditHistoryViewModel? { override fun create(viewModelContext: ViewModelContext, state: ViewEditHistoryViewState): ViewEditHistoryViewModel? {

View file

@ -19,7 +19,7 @@ package im.vector.app.features.home.room.detail.timeline.reactions
import com.airbnb.mvrx.Async import com.airbnb.mvrx.Async
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.MavericksState import com.airbnb.mvrx.MavericksState
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Uninitialized import com.airbnb.mvrx.Uninitialized
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
@ -74,7 +74,7 @@ class ViewReactionsViewModel @AssistedInject constructor(@Assisted
fun create(initialState: DisplayReactionsViewState): ViewReactionsViewModel fun create(initialState: DisplayReactionsViewState): ViewReactionsViewModel
} }
companion object : MvRxViewModelFactory<ViewReactionsViewModel, DisplayReactionsViewState> { companion object : MavericksViewModelFactory<ViewReactionsViewModel, DisplayReactionsViewState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: DisplayReactionsViewState): ViewReactionsViewModel? { override fun create(viewModelContext: ViewModelContext, state: DisplayReactionsViewState): ViewReactionsViewModel? {

View file

@ -19,7 +19,7 @@ package im.vector.app.features.home.room.detail.upgrade
import com.airbnb.mvrx.ActivityViewModelContext import com.airbnb.mvrx.ActivityViewModelContext
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
@ -55,7 +55,7 @@ class MigrateRoomViewModel @AssistedInject constructor(
fun create(initialState: MigrateRoomViewState): MigrateRoomViewModel fun create(initialState: MigrateRoomViewState): MigrateRoomViewModel
} }
companion object : MvRxViewModelFactory<MigrateRoomViewModel, MigrateRoomViewState> { companion object : MavericksViewModelFactory<MigrateRoomViewModel, MigrateRoomViewState> {
override fun create(viewModelContext: ViewModelContext, state: MigrateRoomViewState): MigrateRoomViewModel? { override fun create(viewModelContext: ViewModelContext, state: MigrateRoomViewState): MigrateRoomViewModel? {
val factory = when (viewModelContext) { val factory = when (viewModelContext) {

View file

@ -18,7 +18,7 @@ package im.vector.app.features.homeserver
import androidx.lifecycle.viewModelScope import androidx.lifecycle.viewModelScope
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
import dagger.assisted.AssistedInject import dagger.assisted.AssistedInject
@ -48,7 +48,7 @@ class HomeServerCapabilitiesViewModel @AssistedInject constructor(
fun create(initialState: HomeServerCapabilitiesViewState): HomeServerCapabilitiesViewModel fun create(initialState: HomeServerCapabilitiesViewState): HomeServerCapabilitiesViewModel
} }
companion object : MvRxViewModelFactory<HomeServerCapabilitiesViewModel, HomeServerCapabilitiesViewState> { companion object : MavericksViewModelFactory<HomeServerCapabilitiesViewModel, HomeServerCapabilitiesViewState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: HomeServerCapabilitiesViewState): HomeServerCapabilitiesViewModel? { override fun create(viewModelContext: ViewModelContext, state: HomeServerCapabilitiesViewState): HomeServerCapabilitiesViewModel? {
val fragment: UserListFragment = (viewModelContext as FragmentViewModelContext).fragment() val fragment: UserListFragment = (viewModelContext as FragmentViewModelContext).fragment()

View file

@ -23,7 +23,7 @@ import androidx.lifecycle.viewModelScope
import com.airbnb.mvrx.ActivityViewModelContext import com.airbnb.mvrx.ActivityViewModelContext
import com.airbnb.mvrx.Fail import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.Uninitialized import com.airbnb.mvrx.Uninitialized
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
@ -86,7 +86,7 @@ class LoginViewModel @AssistedInject constructor(
} }
} }
companion object : MvRxViewModelFactory<LoginViewModel, LoginViewState> { companion object : MavericksViewModelFactory<LoginViewModel, LoginViewState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: LoginViewState): LoginViewModel? { override fun create(viewModelContext: ViewModelContext, state: LoginViewState): LoginViewModel? {

View file

@ -22,7 +22,7 @@ import androidx.fragment.app.FragmentActivity
import androidx.lifecycle.viewModelScope import androidx.lifecycle.viewModelScope
import com.airbnb.mvrx.ActivityViewModelContext import com.airbnb.mvrx.ActivityViewModelContext
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory import dagger.assisted.AssistedFactory
@ -86,7 +86,7 @@ class LoginViewModel2 @AssistedInject constructor(
} }
} }
companion object : MvRxViewModelFactory<LoginViewModel2, LoginViewState2> { companion object : MavericksViewModelFactory<LoginViewModel2, LoginViewState2> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: LoginViewState2): LoginViewModel2? { override fun create(viewModelContext: ViewModelContext, state: LoginViewState2): LoginViewModel2? {

View file

@ -18,7 +18,7 @@ package im.vector.app.features.login2.created
import androidx.lifecycle.viewModelScope import androidx.lifecycle.viewModelScope
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory import dagger.assisted.AssistedFactory
@ -43,7 +43,7 @@ class AccountCreatedViewModel @AssistedInject constructor(
fun create(initialState: AccountCreatedViewState): AccountCreatedViewModel fun create(initialState: AccountCreatedViewState): AccountCreatedViewModel
} }
companion object : MvRxViewModelFactory<AccountCreatedViewModel, AccountCreatedViewState> { companion object : MavericksViewModelFactory<AccountCreatedViewModel, AccountCreatedViewState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: AccountCreatedViewState): AccountCreatedViewModel? { override fun create(viewModelContext: ViewModelContext, state: AccountCreatedViewState): AccountCreatedViewModel? {

View file

@ -20,7 +20,7 @@ import androidx.lifecycle.viewModelScope
import com.airbnb.mvrx.Fail import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.Uninitialized import com.airbnb.mvrx.Uninitialized
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
@ -245,7 +245,7 @@ class MatrixToBottomSheetViewModel @AssistedInject constructor(
return session.peekRoom(roomIdOrAlias) return session.peekRoom(roomIdOrAlias)
} }
companion object : MvRxViewModelFactory<MatrixToBottomSheetViewModel, MatrixToBottomSheetState> { companion object : MavericksViewModelFactory<MatrixToBottomSheetViewModel, MatrixToBottomSheetState> {
override fun create(viewModelContext: ViewModelContext, state: MatrixToBottomSheetState): MatrixToBottomSheetViewModel? { override fun create(viewModelContext: ViewModelContext, state: MatrixToBottomSheetState): MatrixToBottomSheetViewModel? {
val fragment: MatrixToBottomSheet = (viewModelContext as FragmentViewModelContext).fragment() val fragment: MatrixToBottomSheet = (viewModelContext as FragmentViewModelContext).fragment()

View file

@ -18,7 +18,7 @@ package im.vector.app.features.rageshake
import androidx.lifecycle.viewModelScope import androidx.lifecycle.viewModelScope
import com.airbnb.mvrx.ActivityViewModelContext import com.airbnb.mvrx.ActivityViewModelContext
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory import dagger.assisted.AssistedFactory
@ -40,7 +40,7 @@ class BugReportViewModel @AssistedInject constructor(
fun create(initialState: BugReportState): BugReportViewModel fun create(initialState: BugReportState): BugReportViewModel
} }
companion object : MvRxViewModelFactory<BugReportViewModel, BugReportState> { companion object : MavericksViewModelFactory<BugReportViewModel, BugReportState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: BugReportState): BugReportViewModel? { override fun create(viewModelContext: ViewModelContext, state: BugReportState): BugReportViewModel? {

View file

@ -18,7 +18,7 @@ package im.vector.app.features.reactions
import androidx.lifecycle.viewModelScope import androidx.lifecycle.viewModelScope
import com.airbnb.mvrx.ActivityViewModelContext import com.airbnb.mvrx.ActivityViewModelContext
import com.airbnb.mvrx.MavericksState import com.airbnb.mvrx.MavericksState
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory import dagger.assisted.AssistedFactory
@ -44,7 +44,7 @@ class EmojiSearchResultViewModel @AssistedInject constructor(
fun create(initialState: EmojiSearchResultViewState): EmojiSearchResultViewModel fun create(initialState: EmojiSearchResultViewState): EmojiSearchResultViewModel
} }
companion object : MvRxViewModelFactory<EmojiSearchResultViewModel, EmojiSearchResultViewState> { companion object : MavericksViewModelFactory<EmojiSearchResultViewModel, EmojiSearchResultViewState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: EmojiSearchResultViewState): EmojiSearchResultViewModel? { override fun create(viewModelContext: ViewModelContext, state: EmojiSearchResultViewState): EmojiSearchResultViewModel? {

View file

@ -18,7 +18,7 @@ package im.vector.app.features.room
import com.airbnb.mvrx.ActivityViewModelContext import com.airbnb.mvrx.ActivityViewModelContext
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import com.jakewharton.rxrelay2.BehaviorRelay import com.jakewharton.rxrelay2.BehaviorRelay
import dagger.assisted.Assisted import dagger.assisted.Assisted
@ -54,7 +54,7 @@ class RequireActiveMembershipViewModel @AssistedInject constructor(
fun create(initialState: RequireActiveMembershipViewState): RequireActiveMembershipViewModel fun create(initialState: RequireActiveMembershipViewState): RequireActiveMembershipViewModel
} }
companion object : MvRxViewModelFactory<RequireActiveMembershipViewModel, RequireActiveMembershipViewState> { companion object : MavericksViewModelFactory<RequireActiveMembershipViewModel, RequireActiveMembershipViewState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: RequireActiveMembershipViewState): RequireActiveMembershipViewModel? { override fun create(viewModelContext: ViewModelContext, state: RequireActiveMembershipViewState): RequireActiveMembershipViewModel? {

View file

@ -20,7 +20,7 @@ import androidx.lifecycle.viewModelScope
import com.airbnb.mvrx.ActivityViewModelContext import com.airbnb.mvrx.ActivityViewModelContext
import com.airbnb.mvrx.Fail import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import com.airbnb.mvrx.appendAt import com.airbnb.mvrx.appendAt
@ -53,7 +53,7 @@ class RoomDirectoryViewModel @AssistedInject constructor(
fun create(initialState: PublicRoomsViewState): RoomDirectoryViewModel fun create(initialState: PublicRoomsViewState): RoomDirectoryViewModel
} }
companion object : MvRxViewModelFactory<RoomDirectoryViewModel, PublicRoomsViewState> { companion object : MavericksViewModelFactory<RoomDirectoryViewModel, PublicRoomsViewState> {
private const val PUBLIC_ROOMS_LIMIT = 20 private const val PUBLIC_ROOMS_LIMIT = 20
@JvmStatic @JvmStatic

View file

@ -21,7 +21,7 @@ import androidx.lifecycle.viewModelScope
import com.airbnb.mvrx.Fail import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.Uninitialized import com.airbnb.mvrx.Uninitialized
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
@ -116,7 +116,7 @@ class CreateRoomViewModel @AssistedInject constructor(@Assisted private val init
} }
} }
companion object : MvRxViewModelFactory<CreateRoomViewModel, CreateRoomViewState> { companion object : MavericksViewModelFactory<CreateRoomViewModel, CreateRoomViewState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: CreateRoomViewState): CreateRoomViewModel? { override fun create(viewModelContext: ViewModelContext, state: CreateRoomViewState): CreateRoomViewModel? {

View file

@ -20,7 +20,7 @@ import androidx.lifecycle.viewModelScope
import com.airbnb.mvrx.Fail import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.Uninitialized import com.airbnb.mvrx.Uninitialized
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
@ -50,7 +50,7 @@ class RoomDirectoryPickerViewModel @AssistedInject constructor(
fun create(initialState: RoomDirectoryPickerViewState): RoomDirectoryPickerViewModel fun create(initialState: RoomDirectoryPickerViewState): RoomDirectoryPickerViewModel
} }
companion object : MvRxViewModelFactory<RoomDirectoryPickerViewModel, RoomDirectoryPickerViewState> { companion object : MavericksViewModelFactory<RoomDirectoryPickerViewModel, RoomDirectoryPickerViewState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: RoomDirectoryPickerViewState): RoomDirectoryPickerViewModel? { override fun create(viewModelContext: ViewModelContext, state: RoomDirectoryPickerViewState): RoomDirectoryPickerViewModel? {

View file

@ -19,7 +19,7 @@ package im.vector.app.features.roomdirectory.roompreview
import androidx.lifecycle.viewModelScope import androidx.lifecycle.viewModelScope
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
@ -52,7 +52,7 @@ class RoomPreviewViewModel @AssistedInject constructor(@Assisted private val ini
fun create(initialState: RoomPreviewViewState): RoomPreviewViewModel fun create(initialState: RoomPreviewViewState): RoomPreviewViewModel
} }
companion object : MvRxViewModelFactory<RoomPreviewViewModel, RoomPreviewViewState> { companion object : MavericksViewModelFactory<RoomPreviewViewModel, RoomPreviewViewState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: RoomPreviewViewState): RoomPreviewViewModel? { override fun create(viewModelContext: ViewModelContext, state: RoomPreviewViewState): RoomPreviewViewModel? {

View file

@ -20,7 +20,7 @@ package im.vector.app.features.roommemberprofile
import com.airbnb.mvrx.Fail import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.Uninitialized import com.airbnb.mvrx.Uninitialized
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
@ -73,7 +73,7 @@ class RoomMemberProfileViewModel @AssistedInject constructor(@Assisted private v
fun create(initialState: RoomMemberProfileViewState): RoomMemberProfileViewModel fun create(initialState: RoomMemberProfileViewState): RoomMemberProfileViewModel
} }
companion object : MvRxViewModelFactory<RoomMemberProfileViewModel, RoomMemberProfileViewState> { companion object : MavericksViewModelFactory<RoomMemberProfileViewModel, RoomMemberProfileViewState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: RoomMemberProfileViewState): RoomMemberProfileViewModel? { override fun create(viewModelContext: ViewModelContext, state: RoomMemberProfileViewState): RoomMemberProfileViewModel? {

View file

@ -20,7 +20,7 @@ import com.airbnb.mvrx.Async
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MavericksState import com.airbnb.mvrx.MavericksState
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
import dagger.assisted.AssistedInject import dagger.assisted.AssistedInject
@ -108,7 +108,7 @@ class DeviceListBottomSheetViewModel @AssistedInject constructor(@Assisted priva
} }
} }
companion object : MvRxViewModelFactory<DeviceListBottomSheetViewModel, DeviceListViewState> { companion object : MavericksViewModelFactory<DeviceListBottomSheetViewModel, DeviceListViewState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: DeviceListViewState): DeviceListBottomSheetViewModel? { override fun create(viewModelContext: ViewModelContext, state: DeviceListViewState): DeviceListBottomSheetViewModel? {
val fragment: DeviceListBottomSheet = (viewModelContext as FragmentViewModelContext).fragment() val fragment: DeviceListBottomSheet = (viewModelContext as FragmentViewModelContext).fragment()

View file

@ -18,7 +18,7 @@
package im.vector.app.features.roomprofile package im.vector.app.features.roomprofile
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory import dagger.assisted.AssistedFactory
@ -57,7 +57,7 @@ class RoomProfileViewModel @AssistedInject constructor(
fun create(initialState: RoomProfileViewState): RoomProfileViewModel fun create(initialState: RoomProfileViewState): RoomProfileViewModel
} }
companion object : MvRxViewModelFactory<RoomProfileViewModel, RoomProfileViewState> { companion object : MavericksViewModelFactory<RoomProfileViewModel, RoomProfileViewState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: RoomProfileViewState): RoomProfileViewModel? { override fun create(viewModelContext: ViewModelContext, state: RoomProfileViewState): RoomProfileViewModel? {

View file

@ -19,7 +19,7 @@ package im.vector.app.features.roomprofile.alias
import com.airbnb.mvrx.Fail import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.Uninitialized import com.airbnb.mvrx.Uninitialized
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
@ -54,7 +54,7 @@ class RoomAliasViewModel @AssistedInject constructor(@Assisted initialState: Roo
fun create(initialState: RoomAliasViewState): RoomAliasViewModel fun create(initialState: RoomAliasViewState): RoomAliasViewModel
} }
companion object : MvRxViewModelFactory<RoomAliasViewModel, RoomAliasViewState> { companion object : MavericksViewModelFactory<RoomAliasViewModel, RoomAliasViewState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: RoomAliasViewState): RoomAliasViewModel? { override fun create(viewModelContext: ViewModelContext, state: RoomAliasViewState): RoomAliasViewModel? {

View file

@ -16,7 +16,7 @@
package im.vector.app.features.roomprofile.alias.detail package im.vector.app.features.roomprofile.alias.detail
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
import dagger.assisted.AssistedInject import dagger.assisted.AssistedInject
@ -36,7 +36,7 @@ class RoomAliasBottomSheetViewModel @AssistedInject constructor(
fun create(initialState: RoomAliasBottomSheetState): RoomAliasBottomSheetViewModel fun create(initialState: RoomAliasBottomSheetState): RoomAliasBottomSheetViewModel
} }
companion object : MvRxViewModelFactory<RoomAliasBottomSheetViewModel, RoomAliasBottomSheetState> { companion object : MavericksViewModelFactory<RoomAliasBottomSheetViewModel, RoomAliasBottomSheetState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: RoomAliasBottomSheetState): RoomAliasBottomSheetViewModel? { override fun create(viewModelContext: ViewModelContext, state: RoomAliasBottomSheetState): RoomAliasBottomSheetViewModel? {

View file

@ -17,7 +17,7 @@
package im.vector.app.features.roomprofile.banned package im.vector.app.features.roomprofile.banned
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
import dagger.assisted.AssistedInject import dagger.assisted.AssistedInject
@ -78,7 +78,7 @@ class RoomBannedMemberListViewModel @AssistedInject constructor(@Assisted initia
} }
} }
companion object : MvRxViewModelFactory<RoomBannedMemberListViewModel, RoomBannedMemberListViewState> { companion object : MavericksViewModelFactory<RoomBannedMemberListViewModel, RoomBannedMemberListViewState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: RoomBannedMemberListViewState): RoomBannedMemberListViewModel? { override fun create(viewModelContext: ViewModelContext, state: RoomBannedMemberListViewState): RoomBannedMemberListViewModel? {

View file

@ -18,7 +18,7 @@ package im.vector.app.features.roomprofile.members
import com.airbnb.mvrx.ActivityViewModelContext import com.airbnb.mvrx.ActivityViewModelContext
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory import dagger.assisted.AssistedFactory
@ -60,7 +60,7 @@ class RoomMemberListViewModel @AssistedInject constructor(@Assisted initialState
fun create(initialState: RoomMemberListViewState): RoomMemberListViewModel fun create(initialState: RoomMemberListViewState): RoomMemberListViewModel
} }
companion object : MvRxViewModelFactory<RoomMemberListViewModel, RoomMemberListViewState> { companion object : MavericksViewModelFactory<RoomMemberListViewModel, RoomMemberListViewState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: RoomMemberListViewState): RoomMemberListViewModel? { override fun create(viewModelContext: ViewModelContext, state: RoomMemberListViewState): RoomMemberListViewModel? {

View file

@ -18,7 +18,7 @@ package im.vector.app.features.roomprofile.notifications
import androidx.lifecycle.viewModelScope import androidx.lifecycle.viewModelScope
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
@ -41,7 +41,7 @@ class RoomNotificationSettingsViewModel @AssistedInject constructor(
fun create(initialState: RoomNotificationSettingsViewState): RoomNotificationSettingsViewModel fun create(initialState: RoomNotificationSettingsViewState): RoomNotificationSettingsViewModel
} }
companion object : MvRxViewModelFactory<RoomNotificationSettingsViewModel, RoomNotificationSettingsViewState> { companion object : MavericksViewModelFactory<RoomNotificationSettingsViewModel, RoomNotificationSettingsViewState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: RoomNotificationSettingsViewState): RoomNotificationSettingsViewModel { override fun create(viewModelContext: ViewModelContext, state: RoomNotificationSettingsViewState): RoomNotificationSettingsViewModel {

View file

@ -17,7 +17,7 @@
package im.vector.app.features.roomprofile.permissions package im.vector.app.features.roomprofile.permissions
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
@ -46,7 +46,7 @@ class RoomPermissionsViewModel @AssistedInject constructor(@Assisted initialStat
fun create(initialState: RoomPermissionsViewState): RoomPermissionsViewModel fun create(initialState: RoomPermissionsViewState): RoomPermissionsViewModel
} }
companion object : MvRxViewModelFactory<RoomPermissionsViewModel, RoomPermissionsViewState> { companion object : MavericksViewModelFactory<RoomPermissionsViewModel, RoomPermissionsViewState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: RoomPermissionsViewState): RoomPermissionsViewModel? { override fun create(viewModelContext: ViewModelContext, state: RoomPermissionsViewState): RoomPermissionsViewModel? {

View file

@ -19,7 +19,7 @@ package im.vector.app.features.roomprofile.settings
import androidx.core.net.toFile import androidx.core.net.toFile
import com.airbnb.mvrx.ActivityViewModelContext import com.airbnb.mvrx.ActivityViewModelContext
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory import dagger.assisted.AssistedFactory
@ -59,7 +59,7 @@ class RoomSettingsViewModel @AssistedInject constructor(@Assisted initialState:
fun create(initialState: RoomSettingsViewState): RoomSettingsViewModel fun create(initialState: RoomSettingsViewState): RoomSettingsViewModel
} }
companion object : MvRxViewModelFactory<RoomSettingsViewModel, RoomSettingsViewState> { companion object : MavericksViewModelFactory<RoomSettingsViewModel, RoomSettingsViewState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: RoomSettingsViewState): RoomSettingsViewModel? { override fun create(viewModelContext: ViewModelContext, state: RoomSettingsViewState): RoomSettingsViewModel? {

View file

@ -23,7 +23,7 @@ import com.airbnb.mvrx.ActivityViewModelContext
import com.airbnb.mvrx.Fail import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.Uninitialized import com.airbnb.mvrx.Uninitialized
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
@ -390,7 +390,7 @@ class RoomJoinRuleChooseRestrictedViewModel @AssistedInject constructor(
} }
} }
companion object : MvRxViewModelFactory<RoomJoinRuleChooseRestrictedViewModel, RoomJoinRuleChooseRestrictedState> { companion object : MavericksViewModelFactory<RoomJoinRuleChooseRestrictedViewModel, RoomJoinRuleChooseRestrictedState> {
override fun create(viewModelContext: ViewModelContext, state: RoomJoinRuleChooseRestrictedState) override fun create(viewModelContext: ViewModelContext, state: RoomJoinRuleChooseRestrictedState)
: RoomJoinRuleChooseRestrictedViewModel? { : RoomJoinRuleChooseRestrictedViewModel? {

View file

@ -21,7 +21,7 @@ import com.airbnb.mvrx.ActivityViewModelContext
import com.airbnb.mvrx.Fail import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
@ -45,7 +45,7 @@ class RoomUploadsViewModel @AssistedInject constructor(
fun create(initialState: RoomUploadsViewState): RoomUploadsViewModel fun create(initialState: RoomUploadsViewState): RoomUploadsViewModel
} }
companion object : MvRxViewModelFactory<RoomUploadsViewModel, RoomUploadsViewState> { companion object : MavericksViewModelFactory<RoomUploadsViewModel, RoomUploadsViewState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: RoomUploadsViewState): RoomUploadsViewModel? { override fun create(viewModelContext: ViewModelContext, state: RoomUploadsViewState): RoomUploadsViewModel? {

View file

@ -18,7 +18,7 @@ package im.vector.app.features.settings.account.deactivation
import androidx.lifecycle.viewModelScope import androidx.lifecycle.viewModelScope
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.MavericksState import com.airbnb.mvrx.MavericksState
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory import dagger.assisted.AssistedFactory
@ -114,7 +114,7 @@ class DeactivateAccountViewModel @AssistedInject constructor(@Assisted private v
} }
} }
companion object : MvRxViewModelFactory<DeactivateAccountViewModel, DeactivateAccountViewState> { companion object : MavericksViewModelFactory<DeactivateAccountViewModel, DeactivateAccountViewState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: DeactivateAccountViewState): DeactivateAccountViewModel? { override fun create(viewModelContext: ViewModelContext, state: DeactivateAccountViewState): DeactivateAccountViewModel? {

View file

@ -17,7 +17,7 @@ package im.vector.app.features.settings.crosssigning
import androidx.lifecycle.viewModelScope import androidx.lifecycle.viewModelScope
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory import dagger.assisted.AssistedFactory
@ -159,7 +159,7 @@ class CrossSigningSettingsViewModel @AssistedInject constructor(
_viewEvents.post(CrossSigningSettingsViewEvents.Failure(Exception(stringProvider.getString(R.string.failed_to_initialize_cross_signing)))) _viewEvents.post(CrossSigningSettingsViewEvents.Failure(Exception(stringProvider.getString(R.string.failed_to_initialize_cross_signing))))
} }
companion object : MvRxViewModelFactory<CrossSigningSettingsViewModel, CrossSigningSettingsViewState> { companion object : MavericksViewModelFactory<CrossSigningSettingsViewModel, CrossSigningSettingsViewState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: CrossSigningSettingsViewState): CrossSigningSettingsViewModel? { override fun create(viewModelContext: ViewModelContext, state: CrossSigningSettingsViewState): CrossSigningSettingsViewModel? {

View file

@ -17,7 +17,7 @@ package im.vector.app.features.settings.devices
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
import dagger.assisted.AssistedInject import dagger.assisted.AssistedInject
@ -88,7 +88,7 @@ class DeviceVerificationInfoBottomSheetViewModel @AssistedInject constructor(@As
} }
} }
companion object : MvRxViewModelFactory<DeviceVerificationInfoBottomSheetViewModel, DeviceVerificationInfoBottomSheetViewState> { companion object : MavericksViewModelFactory<DeviceVerificationInfoBottomSheetViewModel, DeviceVerificationInfoBottomSheetViewState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: DeviceVerificationInfoBottomSheetViewState) override fun create(viewModelContext: ViewModelContext, state: DeviceVerificationInfoBottomSheetViewState)

View file

@ -22,7 +22,7 @@ import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MavericksState import com.airbnb.mvrx.MavericksState
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.Uninitialized import com.airbnb.mvrx.Uninitialized
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
@ -97,7 +97,7 @@ class DevicesViewModel @AssistedInject constructor(
fun create(initialState: DevicesViewState): DevicesViewModel fun create(initialState: DevicesViewState): DevicesViewModel
} }
companion object : MvRxViewModelFactory<DevicesViewModel, DevicesViewState> { companion object : MavericksViewModelFactory<DevicesViewModel, DevicesViewState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: DevicesViewState): DevicesViewModel? { override fun create(viewModelContext: ViewModelContext, state: DevicesViewState): DevicesViewModel? {

View file

@ -20,7 +20,6 @@ import com.airbnb.mvrx.Async
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.MavericksState import com.airbnb.mvrx.MavericksState
import com.airbnb.mvrx.MavericksViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.MvRxViewModelFactory
import com.airbnb.mvrx.Uninitialized import com.airbnb.mvrx.Uninitialized
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted

View file

@ -21,7 +21,7 @@ import com.airbnb.mvrx.Async
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MavericksState import com.airbnb.mvrx.MavericksState
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Uninitialized import com.airbnb.mvrx.Uninitialized
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
@ -63,7 +63,7 @@ class GossipingEventsPaperTrailViewModel @AssistedInject constructor(@Assisted i
fun create(initialState: GossipingEventsPaperTrailState): GossipingEventsPaperTrailViewModel fun create(initialState: GossipingEventsPaperTrailState): GossipingEventsPaperTrailViewModel
} }
companion object : MvRxViewModelFactory<GossipingEventsPaperTrailViewModel, GossipingEventsPaperTrailState> { companion object : MavericksViewModelFactory<GossipingEventsPaperTrailViewModel, GossipingEventsPaperTrailState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: GossipingEventsPaperTrailState): GossipingEventsPaperTrailViewModel? { override fun create(viewModelContext: ViewModelContext, state: GossipingEventsPaperTrailState): GossipingEventsPaperTrailViewModel? {

View file

@ -21,7 +21,7 @@ import androidx.paging.PagedList
import com.airbnb.mvrx.Async import com.airbnb.mvrx.Async
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.MavericksState import com.airbnb.mvrx.MavericksState
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Uninitialized import com.airbnb.mvrx.Uninitialized
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
@ -71,7 +71,7 @@ class KeyRequestListViewModel @AssistedInject constructor(@Assisted initialState
fun create(initialState: KeyRequestListViewState): KeyRequestListViewModel fun create(initialState: KeyRequestListViewState): KeyRequestListViewModel
} }
companion object : MvRxViewModelFactory<KeyRequestListViewModel, KeyRequestListViewState> { companion object : MavericksViewModelFactory<KeyRequestListViewModel, KeyRequestListViewState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: KeyRequestListViewState): KeyRequestListViewModel? { override fun create(viewModelContext: ViewModelContext, state: KeyRequestListViewState): KeyRequestListViewModel? {

View file

@ -23,7 +23,7 @@ import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MavericksState import com.airbnb.mvrx.MavericksState
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.Uninitialized import com.airbnb.mvrx.Uninitialized
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
@ -60,7 +60,7 @@ class KeyRequestViewModel @AssistedInject constructor(
fun create(initialState: KeyRequestViewState): KeyRequestViewModel fun create(initialState: KeyRequestViewState): KeyRequestViewModel
} }
companion object : MvRxViewModelFactory<KeyRequestViewModel, KeyRequestViewState> { companion object : MavericksViewModelFactory<KeyRequestViewModel, KeyRequestViewState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: KeyRequestViewState): KeyRequestViewModel? { override fun create(viewModelContext: ViewModelContext, state: KeyRequestViewState): KeyRequestViewModel? {

View file

@ -20,7 +20,7 @@ import androidx.lifecycle.viewModelScope
import com.airbnb.mvrx.Fail import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
@ -41,7 +41,7 @@ class HomeserverSettingsViewModel @AssistedInject constructor(
fun create(initialState: HomeServerSettingsViewState): HomeserverSettingsViewModel fun create(initialState: HomeServerSettingsViewState): HomeserverSettingsViewModel
} }
companion object : MvRxViewModelFactory<HomeserverSettingsViewModel, HomeServerSettingsViewState> { companion object : MavericksViewModelFactory<HomeserverSettingsViewModel, HomeServerSettingsViewState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: HomeServerSettingsViewState): HomeserverSettingsViewModel? { override fun create(viewModelContext: ViewModelContext, state: HomeServerSettingsViewState): HomeserverSettingsViewModel? {

View file

@ -22,7 +22,7 @@ import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MavericksState import com.airbnb.mvrx.MavericksState
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.Uninitialized import com.airbnb.mvrx.Uninitialized
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
@ -54,7 +54,7 @@ class IgnoredUsersViewModel @AssistedInject constructor(@Assisted initialState:
fun create(initialState: IgnoredUsersViewState): IgnoredUsersViewModel fun create(initialState: IgnoredUsersViewState): IgnoredUsersViewModel
} }
companion object : MvRxViewModelFactory<IgnoredUsersViewModel, IgnoredUsersViewState> { companion object : MavericksViewModelFactory<IgnoredUsersViewModel, IgnoredUsersViewState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: IgnoredUsersViewState): IgnoredUsersViewModel? { override fun create(viewModelContext: ViewModelContext, state: IgnoredUsersViewState): IgnoredUsersViewModel? {

View file

@ -19,7 +19,7 @@ package im.vector.app.features.settings.locale
import androidx.lifecycle.viewModelScope import androidx.lifecycle.viewModelScope
import com.airbnb.mvrx.ActivityViewModelContext import com.airbnb.mvrx.ActivityViewModelContext
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
@ -53,7 +53,7 @@ class LocalePickerViewModel @AssistedInject constructor(
} }
} }
companion object : MvRxViewModelFactory<LocalePickerViewModel, LocalePickerViewState> { companion object : MavericksViewModelFactory<LocalePickerViewModel, LocalePickerViewState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: LocalePickerViewState): LocalePickerViewModel? { override fun create(viewModelContext: ViewModelContext, state: LocalePickerViewState): LocalePickerViewModel? {

View file

@ -20,7 +20,7 @@ import androidx.lifecycle.viewModelScope
import com.airbnb.mvrx.Async import com.airbnb.mvrx.Async
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.MavericksState import com.airbnb.mvrx.MavericksState
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Uninitialized import com.airbnb.mvrx.Uninitialized
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
@ -46,7 +46,7 @@ class PushGatewaysViewModel @AssistedInject constructor(@Assisted initialState:
fun create(initialState: PushGatewayViewState): PushGatewaysViewModel fun create(initialState: PushGatewayViewState): PushGatewaysViewModel
} }
companion object : MvRxViewModelFactory<PushGatewaysViewModel, PushGatewayViewState> { companion object : MavericksViewModelFactory<PushGatewaysViewModel, PushGatewayViewState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: PushGatewayViewState): PushGatewaysViewModel? { override fun create(viewModelContext: ViewModelContext, state: PushGatewayViewState): PushGatewaysViewModel? {

View file

@ -16,7 +16,7 @@
package im.vector.app.features.settings.push package im.vector.app.features.settings.push
import com.airbnb.mvrx.MavericksState import com.airbnb.mvrx.MavericksState
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import im.vector.app.core.di.HasScreenInjector import im.vector.app.core.di.HasScreenInjector
import im.vector.app.core.platform.EmptyAction import im.vector.app.core.platform.EmptyAction
@ -31,7 +31,7 @@ data class PushRulesViewState(
class PushRulesViewModel(initialState: PushRulesViewState) class PushRulesViewModel(initialState: PushRulesViewState)
: VectorViewModel<PushRulesViewState, EmptyAction, EmptyViewEvents>(initialState) { : VectorViewModel<PushRulesViewState, EmptyAction, EmptyViewEvents>(initialState) {
companion object : MvRxViewModelFactory<PushRulesViewModel, PushRulesViewState> { companion object : MavericksViewModelFactory<PushRulesViewModel, PushRulesViewState> {
override fun initialState(viewModelContext: ViewModelContext): PushRulesViewState? { override fun initialState(viewModelContext: ViewModelContext): PushRulesViewState? {
val session = (viewModelContext.activity as HasScreenInjector).injector().activeSessionHolder().getActiveSession() val session = (viewModelContext.activity as HasScreenInjector).injector().activeSessionHolder().getActiveSession()

View file

@ -21,7 +21,7 @@ import com.airbnb.mvrx.ActivityViewModelContext
import com.airbnb.mvrx.Fail import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory import dagger.assisted.AssistedFactory
@ -84,7 +84,7 @@ class ThreePidsSettingsViewModel @AssistedInject constructor(
fun create(initialState: ThreePidsSettingsViewState): ThreePidsSettingsViewModel fun create(initialState: ThreePidsSettingsViewState): ThreePidsSettingsViewModel
} }
companion object : MvRxViewModelFactory<ThreePidsSettingsViewModel, ThreePidsSettingsViewState> { companion object : MavericksViewModelFactory<ThreePidsSettingsViewModel, ThreePidsSettingsViewState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: ThreePidsSettingsViewState): ThreePidsSettingsViewModel? { override fun create(viewModelContext: ViewModelContext, state: ThreePidsSettingsViewState): ThreePidsSettingsViewModel? {

View file

@ -17,7 +17,7 @@
package im.vector.app.features.share package im.vector.app.features.share
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import com.jakewharton.rxrelay2.BehaviorRelay import com.jakewharton.rxrelay2.BehaviorRelay
import dagger.assisted.Assisted import dagger.assisted.Assisted
@ -48,7 +48,7 @@ class IncomingShareViewModel @AssistedInject constructor(
fun create(initialState: IncomingShareViewState): IncomingShareViewModel fun create(initialState: IncomingShareViewState): IncomingShareViewModel
} }
companion object : MvRxViewModelFactory<IncomingShareViewModel, IncomingShareViewState> { companion object : MavericksViewModelFactory<IncomingShareViewModel, IncomingShareViewState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: IncomingShareViewState): IncomingShareViewModel? { override fun create(viewModelContext: ViewModelContext, state: IncomingShareViewState): IncomingShareViewModel? {

View file

@ -19,7 +19,7 @@ package im.vector.app.features.signout.soft
import com.airbnb.mvrx.ActivityViewModelContext import com.airbnb.mvrx.ActivityViewModelContext
import com.airbnb.mvrx.Fail import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.Uninitialized import com.airbnb.mvrx.Uninitialized
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
@ -51,7 +51,7 @@ class SoftLogoutViewModel @AssistedInject constructor(
fun create(initialState: SoftLogoutViewState): SoftLogoutViewModel fun create(initialState: SoftLogoutViewState): SoftLogoutViewModel
} }
companion object : MvRxViewModelFactory<SoftLogoutViewModel, SoftLogoutViewState> { companion object : MavericksViewModelFactory<SoftLogoutViewModel, SoftLogoutViewState> {
override fun initialState(viewModelContext: ViewModelContext): SoftLogoutViewState? { override fun initialState(viewModelContext: ViewModelContext): SoftLogoutViewState? {
val activity: SoftLogoutActivity = (viewModelContext as ActivityViewModelContext).activity() val activity: SoftLogoutActivity = (viewModelContext as ActivityViewModelContext).activity()

View file

@ -20,7 +20,7 @@ import com.airbnb.mvrx.ActivityViewModelContext
import com.airbnb.mvrx.Fail import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.Uninitialized import com.airbnb.mvrx.Uninitialized
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
@ -56,7 +56,7 @@ class SpaceMenuViewModel @AssistedInject constructor(
fun create(initialState: SpaceMenuState): SpaceMenuViewModel fun create(initialState: SpaceMenuState): SpaceMenuViewModel
} }
companion object : MvRxViewModelFactory<SpaceMenuViewModel, SpaceMenuState> { companion object : MavericksViewModelFactory<SpaceMenuViewModel, SpaceMenuState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: SpaceMenuState): SpaceMenuViewModel? { override fun create(viewModelContext: ViewModelContext, state: SpaceMenuState): SpaceMenuViewModel? {

View file

@ -19,7 +19,7 @@ package im.vector.app.features.spaces
import androidx.lifecycle.viewModelScope import androidx.lifecycle.viewModelScope
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
@ -71,7 +71,7 @@ class SpacesListViewModel @AssistedInject constructor(@Assisted initialState: Sp
fun create(initialState: SpaceListViewState): SpacesListViewModel fun create(initialState: SpaceListViewState): SpacesListViewModel
} }
companion object : MvRxViewModelFactory<SpacesListViewModel, SpaceListViewState> { companion object : MavericksViewModelFactory<SpacesListViewModel, SpaceListViewState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: SpaceListViewState): SpacesListViewModel { override fun create(viewModelContext: ViewModelContext, state: SpaceListViewState): SpacesListViewModel {

View file

@ -21,7 +21,7 @@ import com.airbnb.mvrx.ActivityViewModelContext
import com.airbnb.mvrx.Fail import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.Uninitialized import com.airbnb.mvrx.Uninitialized
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
@ -93,7 +93,7 @@ class CreateSpaceViewModel @AssistedInject constructor(
super.onCleared() super.onCleared()
} }
companion object : MvRxViewModelFactory<CreateSpaceViewModel, CreateSpaceState> { companion object : MavericksViewModelFactory<CreateSpaceViewModel, CreateSpaceState> {
override fun create(viewModelContext: ViewModelContext, state: CreateSpaceState): CreateSpaceViewModel? { override fun create(viewModelContext: ViewModelContext, state: CreateSpaceState): CreateSpaceViewModel? {
val factory = when (viewModelContext) { val factory = when (viewModelContext) {

View file

@ -20,7 +20,7 @@ import com.airbnb.mvrx.ActivityViewModelContext
import com.airbnb.mvrx.Fail import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.Uninitialized import com.airbnb.mvrx.Uninitialized
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
@ -55,7 +55,7 @@ class SpaceDirectoryViewModel @AssistedInject constructor(
fun create(initialState: SpaceDirectoryState): SpaceDirectoryViewModel fun create(initialState: SpaceDirectoryState): SpaceDirectoryViewModel
} }
companion object : MvRxViewModelFactory<SpaceDirectoryViewModel, SpaceDirectoryState> { companion object : MavericksViewModelFactory<SpaceDirectoryViewModel, SpaceDirectoryState> {
override fun create(viewModelContext: ViewModelContext, state: SpaceDirectoryState): SpaceDirectoryViewModel? { override fun create(viewModelContext: ViewModelContext, state: SpaceDirectoryState): SpaceDirectoryViewModel? {
val factory = when (viewModelContext) { val factory = when (viewModelContext) {
is FragmentViewModelContext -> viewModelContext.fragment as? Factory is FragmentViewModelContext -> viewModelContext.fragment as? Factory

View file

@ -21,7 +21,7 @@ import com.airbnb.mvrx.ActivityViewModelContext
import com.airbnb.mvrx.Fail import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.Uninitialized import com.airbnb.mvrx.Uninitialized
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
@ -97,7 +97,7 @@ class SpaceInviteBottomSheetViewModel @AssistedInject constructor(
fun create(initialState: SpaceInviteBottomSheetState): SpaceInviteBottomSheetViewModel fun create(initialState: SpaceInviteBottomSheetState): SpaceInviteBottomSheetViewModel
} }
companion object : MvRxViewModelFactory<SpaceInviteBottomSheetViewModel, SpaceInviteBottomSheetState> { companion object : MavericksViewModelFactory<SpaceInviteBottomSheetViewModel, SpaceInviteBottomSheetState> {
override fun create(viewModelContext: ViewModelContext, state: SpaceInviteBottomSheetState): SpaceInviteBottomSheetViewModel? { override fun create(viewModelContext: ViewModelContext, state: SpaceInviteBottomSheetState): SpaceInviteBottomSheetViewModel? {
val factory = when (viewModelContext) { val factory = when (viewModelContext) {

View file

@ -21,7 +21,7 @@ import com.airbnb.mvrx.ActivityViewModelContext
import com.airbnb.mvrx.Fail import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.Uninitialized import com.airbnb.mvrx.Uninitialized
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
@ -129,7 +129,7 @@ class SpaceLeaveAdvancedViewModel @AssistedInject constructor(
fun create(initialState: SpaceLeaveAdvanceViewState): SpaceLeaveAdvancedViewModel fun create(initialState: SpaceLeaveAdvanceViewState): SpaceLeaveAdvancedViewModel
} }
companion object : MvRxViewModelFactory<SpaceLeaveAdvancedViewModel, SpaceLeaveAdvanceViewState> { companion object : MavericksViewModelFactory<SpaceLeaveAdvancedViewModel, SpaceLeaveAdvanceViewState> {
override fun create(viewModelContext: ViewModelContext, state: SpaceLeaveAdvanceViewState): SpaceLeaveAdvancedViewModel? { override fun create(viewModelContext: ViewModelContext, state: SpaceLeaveAdvanceViewState): SpaceLeaveAdvancedViewModel? {
val factory = when (viewModelContext) { val factory = when (viewModelContext) {
is FragmentViewModelContext -> viewModelContext.fragment as? Factory is FragmentViewModelContext -> viewModelContext.fragment as? Factory

View file

@ -23,7 +23,7 @@ import com.airbnb.mvrx.ActivityViewModelContext
import com.airbnb.mvrx.Fail import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
@ -132,7 +132,7 @@ class SpaceAddRoomsViewModel @AssistedInject constructor(
} }
} }
companion object : MvRxViewModelFactory<SpaceAddRoomsViewModel, SpaceAddRoomsState> { companion object : MavericksViewModelFactory<SpaceAddRoomsViewModel, SpaceAddRoomsState> {
override fun create(viewModelContext: ViewModelContext, state: SpaceAddRoomsState): SpaceAddRoomsViewModel? { override fun create(viewModelContext: ViewModelContext, state: SpaceAddRoomsState): SpaceAddRoomsViewModel? {
val factory = when (viewModelContext) { val factory = when (viewModelContext) {
is FragmentViewModelContext -> viewModelContext.fragment as? Factory is FragmentViewModelContext -> viewModelContext.fragment as? Factory

View file

@ -21,7 +21,7 @@ import com.airbnb.mvrx.ActivityViewModelContext
import com.airbnb.mvrx.Fail import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.Uninitialized import com.airbnb.mvrx.Uninitialized
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
@ -60,7 +60,7 @@ class SpaceManageRoomsViewModel @AssistedInject constructor(
fun create(initialState: SpaceManageRoomViewState): SpaceManageRoomsViewModel fun create(initialState: SpaceManageRoomViewState): SpaceManageRoomsViewModel
} }
companion object : MvRxViewModelFactory<SpaceManageRoomsViewModel, SpaceManageRoomViewState> { companion object : MavericksViewModelFactory<SpaceManageRoomsViewModel, SpaceManageRoomViewState> {
override fun create(viewModelContext: ViewModelContext, state: SpaceManageRoomViewState): SpaceManageRoomsViewModel? { override fun create(viewModelContext: ViewModelContext, state: SpaceManageRoomViewState): SpaceManageRoomsViewModel? {
val factory = when (viewModelContext) { val factory = when (viewModelContext) {
is FragmentViewModelContext -> viewModelContext.fragment as? Factory is FragmentViewModelContext -> viewModelContext.fragment as? Factory

View file

@ -18,7 +18,7 @@ package im.vector.app.features.spaces.manage
import com.airbnb.mvrx.ActivityViewModelContext import com.airbnb.mvrx.ActivityViewModelContext
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory import dagger.assisted.AssistedFactory
@ -37,7 +37,7 @@ class SpaceManageSharedViewModel @AssistedInject constructor(
fun create(initialState: SpaceManageViewState): SpaceManageSharedViewModel fun create(initialState: SpaceManageViewState): SpaceManageSharedViewModel
} }
companion object : MvRxViewModelFactory<SpaceManageSharedViewModel, SpaceManageViewState> { companion object : MavericksViewModelFactory<SpaceManageSharedViewModel, SpaceManageViewState> {
override fun create(viewModelContext: ViewModelContext, state: SpaceManageViewState): SpaceManageSharedViewModel? { override fun create(viewModelContext: ViewModelContext, state: SpaceManageViewState): SpaceManageSharedViewModel? {
val factory = when (viewModelContext) { val factory = when (viewModelContext) {
is FragmentViewModelContext -> viewModelContext.fragment as? Factory is FragmentViewModelContext -> viewModelContext.fragment as? Factory

View file

@ -21,7 +21,7 @@ import com.airbnb.mvrx.ActivityViewModelContext
import com.airbnb.mvrx.Fail import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
@ -48,7 +48,7 @@ class SpacePeopleViewModel @AssistedInject constructor(
fun create(initialState: SpacePeopleViewState): SpacePeopleViewModel fun create(initialState: SpacePeopleViewState): SpacePeopleViewModel
} }
companion object : MvRxViewModelFactory<SpacePeopleViewModel, SpacePeopleViewState> { companion object : MavericksViewModelFactory<SpacePeopleViewModel, SpacePeopleViewState> {
override fun create(viewModelContext: ViewModelContext, state: SpacePeopleViewState): SpacePeopleViewModel? { override fun create(viewModelContext: ViewModelContext, state: SpacePeopleViewState): SpacePeopleViewModel? {
val factory = when (viewModelContext) { val factory = when (viewModelContext) {
is FragmentViewModelContext -> viewModelContext.fragment as? Factory is FragmentViewModelContext -> viewModelContext.fragment as? Factory

View file

@ -21,7 +21,7 @@ import com.airbnb.mvrx.ActivityViewModelContext
import com.airbnb.mvrx.Fail import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.Uninitialized import com.airbnb.mvrx.Uninitialized
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
@ -62,7 +62,7 @@ class SpacePreviewViewModel @AssistedInject constructor(
fun create(initialState: SpacePreviewState): SpacePreviewViewModel fun create(initialState: SpacePreviewState): SpacePreviewViewModel
} }
companion object : MvRxViewModelFactory<SpacePreviewViewModel, SpacePreviewState> { companion object : MavericksViewModelFactory<SpacePreviewViewModel, SpacePreviewState> {
override fun create(viewModelContext: ViewModelContext, state: SpacePreviewState): SpacePreviewViewModel? { override fun create(viewModelContext: ViewModelContext, state: SpacePreviewState): SpacePreviewViewModel? {
val factory = when (viewModelContext) { val factory = when (viewModelContext) {
is FragmentViewModelContext -> viewModelContext.fragment as? Factory is FragmentViewModelContext -> viewModelContext.fragment as? Factory

View file

@ -18,7 +18,7 @@ package im.vector.app.features.spaces.share
import com.airbnb.mvrx.ActivityViewModelContext import com.airbnb.mvrx.ActivityViewModelContext
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.Uninitialized import com.airbnb.mvrx.Uninitialized
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
@ -42,7 +42,7 @@ class ShareSpaceViewModel @AssistedInject constructor(
fun create(initialState: ShareSpaceViewState): ShareSpaceViewModel fun create(initialState: ShareSpaceViewState): ShareSpaceViewModel
} }
companion object : MvRxViewModelFactory<ShareSpaceViewModel, ShareSpaceViewState> { companion object : MavericksViewModelFactory<ShareSpaceViewModel, ShareSpaceViewState> {
override fun create(viewModelContext: ViewModelContext, state: ShareSpaceViewState): ShareSpaceViewModel? { override fun create(viewModelContext: ViewModelContext, state: ShareSpaceViewState): ShareSpaceViewModel? {
val factory = when (viewModelContext) { val factory = when (viewModelContext) {
is FragmentViewModelContext -> viewModelContext.fragment as? Factory is FragmentViewModelContext -> viewModelContext.fragment as? Factory

View file

@ -18,7 +18,7 @@ package im.vector.app.features.terms
import androidx.lifecycle.viewModelScope import androidx.lifecycle.viewModelScope
import com.airbnb.mvrx.ActivityViewModelContext import com.airbnb.mvrx.ActivityViewModelContext
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.Uninitialized import com.airbnb.mvrx.Uninitialized
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
@ -41,7 +41,7 @@ class ReviewTermsViewModel @AssistedInject constructor(
fun create(initialState: ReviewTermsViewState): ReviewTermsViewModel fun create(initialState: ReviewTermsViewState): ReviewTermsViewModel
} }
companion object : MvRxViewModelFactory<ReviewTermsViewModel, ReviewTermsViewState> { companion object : MavericksViewModelFactory<ReviewTermsViewModel, ReviewTermsViewState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: ReviewTermsViewState): ReviewTermsViewModel? { override fun create(viewModelContext: ViewModelContext, state: ReviewTermsViewState): ReviewTermsViewModel? {

View file

@ -19,7 +19,7 @@ package im.vector.app.features.usercode
import androidx.lifecycle.viewModelScope import androidx.lifecycle.viewModelScope
import com.airbnb.mvrx.ActivityViewModelContext import com.airbnb.mvrx.ActivityViewModelContext
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
import dagger.assisted.AssistedInject import dagger.assisted.AssistedInject
@ -45,7 +45,7 @@ class UserCodeSharedViewModel @AssistedInject constructor(
private val directRoomHelper: DirectRoomHelper, private val directRoomHelper: DirectRoomHelper,
private val rawService: RawService) : VectorViewModel<UserCodeState, UserCodeActions, UserCodeShareViewEvents>(initialState) { private val rawService: RawService) : VectorViewModel<UserCodeState, UserCodeActions, UserCodeShareViewEvents>(initialState) {
companion object : MvRxViewModelFactory<UserCodeSharedViewModel, UserCodeState> { companion object : MavericksViewModelFactory<UserCodeSharedViewModel, UserCodeState> {
override fun create(viewModelContext: ViewModelContext, state: UserCodeState): UserCodeSharedViewModel? { override fun create(viewModelContext: ViewModelContext, state: UserCodeState): UserCodeSharedViewModel? {
val factory = when (viewModelContext) { val factory = when (viewModelContext) {
is FragmentViewModelContext -> viewModelContext.fragment as? Factory is FragmentViewModelContext -> viewModelContext.fragment as? Factory

View file

@ -18,7 +18,7 @@ package im.vector.app.features.userdirectory
import com.airbnb.mvrx.ActivityViewModelContext import com.airbnb.mvrx.ActivityViewModelContext
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Uninitialized import com.airbnb.mvrx.Uninitialized
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import com.jakewharton.rxrelay2.BehaviorRelay import com.jakewharton.rxrelay2.BehaviorRelay
@ -63,7 +63,7 @@ class UserListViewModel @AssistedInject constructor(@Assisted initialState: User
fun create(initialState: UserListViewState): UserListViewModel fun create(initialState: UserListViewState): UserListViewModel
} }
companion object : MvRxViewModelFactory<UserListViewModel, UserListViewState> { companion object : MavericksViewModelFactory<UserListViewModel, UserListViewState> {
override fun create(viewModelContext: ViewModelContext, state: UserListViewState): UserListViewModel? { override fun create(viewModelContext: ViewModelContext, state: UserListViewState): UserListViewModel? {
val factory = when (viewModelContext) { val factory = when (viewModelContext) {

View file

@ -22,7 +22,7 @@ import com.airbnb.mvrx.ActivityViewModelContext
import com.airbnb.mvrx.Fail import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
@ -60,7 +60,7 @@ class WidgetViewModel @AssistedInject constructor(@Assisted val initialState: Wi
fun create(initialState: WidgetViewState): WidgetViewModel fun create(initialState: WidgetViewState): WidgetViewModel
} }
companion object : MvRxViewModelFactory<WidgetViewModel, WidgetViewState> { companion object : MavericksViewModelFactory<WidgetViewModel, WidgetViewState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: WidgetViewState): WidgetViewModel? { override fun create(viewModelContext: ViewModelContext, state: WidgetViewState): WidgetViewModel? {

View file

@ -18,7 +18,7 @@ package im.vector.app.features.widgets.permissions
import androidx.lifecycle.viewModelScope import androidx.lifecycle.viewModelScope
import com.airbnb.mvrx.ActivityViewModelContext import com.airbnb.mvrx.ActivityViewModelContext
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
import dagger.assisted.AssistedInject import dagger.assisted.AssistedInject
@ -144,7 +144,7 @@ class RoomWidgetPermissionViewModel @AssistedInject constructor(@Assisted val in
fun create(initialState: RoomWidgetPermissionViewState): RoomWidgetPermissionViewModel fun create(initialState: RoomWidgetPermissionViewState): RoomWidgetPermissionViewModel
} }
companion object : MvRxViewModelFactory<RoomWidgetPermissionViewModel, RoomWidgetPermissionViewState> { companion object : MavericksViewModelFactory<RoomWidgetPermissionViewModel, RoomWidgetPermissionViewState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: RoomWidgetPermissionViewState): RoomWidgetPermissionViewModel? { override fun create(viewModelContext: ViewModelContext, state: RoomWidgetPermissionViewState): RoomWidgetPermissionViewModel? {

View file

@ -21,7 +21,7 @@ import com.airbnb.mvrx.ActivityViewModelContext
import com.airbnb.mvrx.Async import com.airbnb.mvrx.Async
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.MavericksState import com.airbnb.mvrx.MavericksState
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Uninitialized import com.airbnb.mvrx.Uninitialized
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
@ -75,7 +75,7 @@ class ServerBackupStatusViewModel @AssistedInject constructor(@Assisted initialS
fun create(initialState: ServerBackupStatusViewState): ServerBackupStatusViewModel fun create(initialState: ServerBackupStatusViewState): ServerBackupStatusViewModel
} }
companion object : MvRxViewModelFactory<ServerBackupStatusViewModel, ServerBackupStatusViewState> { companion object : MavericksViewModelFactory<ServerBackupStatusViewModel, ServerBackupStatusViewState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: ServerBackupStatusViewState): ServerBackupStatusViewModel? { override fun create(viewModelContext: ViewModelContext, state: ServerBackupStatusViewState): ServerBackupStatusViewModel? {

View file

@ -23,7 +23,7 @@ import com.airbnb.mvrx.Async
import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MavericksState import com.airbnb.mvrx.MavericksState
import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.Uninitialized import com.airbnb.mvrx.Uninitialized
import com.airbnb.mvrx.ViewModelContext import com.airbnb.mvrx.ViewModelContext
@ -69,7 +69,7 @@ class SignoutCheckViewModel @AssistedInject constructor(
fun create(initialState: SignoutCheckViewState): SignoutCheckViewModel fun create(initialState: SignoutCheckViewState): SignoutCheckViewModel
} }
companion object : MvRxViewModelFactory<SignoutCheckViewModel, SignoutCheckViewState> { companion object : MavericksViewModelFactory<SignoutCheckViewModel, SignoutCheckViewState> {
@JvmStatic @JvmStatic
override fun create(viewModelContext: ViewModelContext, state: SignoutCheckViewState): SignoutCheckViewModel? { override fun create(viewModelContext: ViewModelContext, state: SignoutCheckViewState): SignoutCheckViewModel? {