mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-12-18 15:22:07 +03:00
Mavericks 2: replace MvRxViewModelFactory by MavericksViewModelFactory
This commit is contained in:
parent
d63e1ecfea
commit
606cddc826
88 changed files with 174 additions and 175 deletions
|
@ -2,7 +2,7 @@ package ${escapeKotlinIdentifiers(packageName)}
|
|||
|
||||
import com.airbnb.mvrx.ActivityViewModelContext
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
|
@ -27,7 +27,7 @@ class ${viewModelClass} @AssistedInject constructor(@Assisted initialState: ${vi
|
|||
fun create(initialState: ${viewStateClass}): ${viewModelClass}
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<${viewModelClass}, ${viewStateClass}> {
|
||||
companion object : MavericksViewModelFactory<${viewModelClass}, ${viewStateClass}> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: ${viewStateClass}): ${viewModelClass}? {
|
||||
|
|
|
@ -18,7 +18,7 @@ package im.vector.app.features.auth
|
|||
|
||||
import com.airbnb.mvrx.ActivityViewModelContext
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedFactory
|
||||
|
@ -39,7 +39,7 @@ class ReAuthViewModel @AssistedInject constructor(
|
|||
fun create(initialState: ReAuthState): ReAuthViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<ReAuthViewModel, ReAuthState> {
|
||||
companion object : MavericksViewModelFactory<ReAuthViewModel, ReAuthState> {
|
||||
|
||||
override fun create(viewModelContext: ViewModelContext, state: ReAuthState): ReAuthViewModel? {
|
||||
val factory = when (viewModelContext) {
|
||||
|
|
|
@ -19,7 +19,7 @@ package im.vector.app.features.call
|
|||
import androidx.lifecycle.viewModelScope
|
||||
import com.airbnb.mvrx.Fail
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
|
@ -345,7 +345,7 @@ class VectorCallViewModel @AssistedInject constructor(
|
|||
fun create(initialState: VectorCallViewState): VectorCallViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<VectorCallViewModel, VectorCallViewState> {
|
||||
companion object : MavericksViewModelFactory<VectorCallViewModel, VectorCallViewState> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: VectorCallViewState): VectorCallViewModel {
|
||||
|
|
|
@ -18,7 +18,7 @@ package im.vector.app.features.call.conference
|
|||
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.airbnb.mvrx.Fail
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
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"
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ package im.vector.app.features.call.transfer
|
|||
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.airbnb.mvrx.ActivityViewModelContext
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedFactory
|
||||
|
@ -45,7 +45,7 @@ class CallTransferViewModel @AssistedInject constructor(@Assisted initialState:
|
|||
fun create(initialState: CallTransferViewState): CallTransferViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<CallTransferViewModel, CallTransferViewState> {
|
||||
companion object : MavericksViewModelFactory<CallTransferViewModel, CallTransferViewState> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: CallTransferViewState): CallTransferViewModel? {
|
||||
|
|
|
@ -20,7 +20,7 @@ import androidx.lifecycle.viewModelScope
|
|||
import com.airbnb.mvrx.ActivityViewModelContext
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
|
@ -49,7 +49,7 @@ class ContactsBookViewModel @AssistedInject constructor(@Assisted
|
|||
fun create(initialState: ContactsBookViewState): ContactsBookViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<ContactsBookViewModel, ContactsBookViewState> {
|
||||
companion object : MavericksViewModelFactory<ContactsBookViewModel, ContactsBookViewState> {
|
||||
|
||||
override fun create(viewModelContext: ViewModelContext, state: ContactsBookViewState): ContactsBookViewModel? {
|
||||
val factory = when (viewModelContext) {
|
||||
|
|
|
@ -20,7 +20,7 @@ import androidx.lifecycle.viewModelScope
|
|||
import com.airbnb.mvrx.ActivityViewModelContext
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
|
@ -49,7 +49,7 @@ class CreateDirectRoomViewModel @AssistedInject constructor(@Assisted
|
|||
fun create(initialState: CreateDirectRoomViewState): CreateDirectRoomViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<CreateDirectRoomViewModel, CreateDirectRoomViewState> {
|
||||
companion object : MavericksViewModelFactory<CreateDirectRoomViewModel, CreateDirectRoomViewState> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: CreateDirectRoomViewState): CreateDirectRoomViewModel? {
|
||||
|
|
|
@ -18,7 +18,7 @@ package im.vector.app.features.crypto.keysbackup.settings
|
|||
import com.airbnb.mvrx.ActivityViewModelContext
|
||||
import com.airbnb.mvrx.Fail
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
|
@ -45,7 +45,7 @@ class KeysBackupSettingsViewModel @AssistedInject constructor(@Assisted initialS
|
|||
fun create(initialState: KeysBackupSettingViewState): KeysBackupSettingsViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<KeysBackupSettingsViewModel, KeysBackupSettingViewState> {
|
||||
companion object : MavericksViewModelFactory<KeysBackupSettingsViewModel, KeysBackupSettingViewState> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: KeysBackupSettingViewState): KeysBackupSettingsViewModel? {
|
||||
|
|
|
@ -22,7 +22,7 @@ import com.airbnb.mvrx.Fail
|
|||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MvRx
|
||||
import com.airbnb.mvrx.MavericksState
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
|
@ -322,7 +322,7 @@ class SharedSecureStorageViewModel @AssistedInject constructor(
|
|||
_viewEvents.post(SharedSecureStorageViewEvent.Dismiss)
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<SharedSecureStorageViewModel, SharedSecureStorageViewState> {
|
||||
companion object : MavericksViewModelFactory<SharedSecureStorageViewModel, SharedSecureStorageViewState> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: SharedSecureStorageViewState): SharedSecureStorageViewModel? {
|
||||
|
|
|
@ -20,7 +20,7 @@ import androidx.lifecycle.viewModelScope
|
|||
import com.airbnb.mvrx.Fail
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
|
@ -552,7 +552,7 @@ class BootstrapSharedViewModel @AssistedInject constructor(
|
|||
// Companion, view model assisted creation
|
||||
// ======================================
|
||||
|
||||
companion object : MvRxViewModelFactory<BootstrapSharedViewModel, BootstrapViewState> {
|
||||
companion object : MavericksViewModelFactory<BootstrapSharedViewModel, BootstrapViewState> {
|
||||
|
||||
override fun create(viewModelContext: ViewModelContext, state: BootstrapViewState): BootstrapSharedViewModel? {
|
||||
val fragment: BootstrapBottomSheet = (viewModelContext as FragmentViewModelContext).fragment()
|
||||
|
|
|
@ -21,7 +21,7 @@ import com.airbnb.mvrx.Fail
|
|||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MavericksState
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
|
@ -223,7 +223,7 @@ class VerificationBottomSheetViewModel @AssistedInject constructor(
|
|||
_viewEvents.post(VerificationBottomSheetViewEvents.GoToSettings)
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<VerificationBottomSheetViewModel, VerificationBottomSheetViewState> {
|
||||
companion object : MavericksViewModelFactory<VerificationBottomSheetViewModel, VerificationBottomSheetViewState> {
|
||||
|
||||
override fun create(viewModelContext: ViewModelContext, state: VerificationBottomSheetViewState): VerificationBottomSheetViewModel? {
|
||||
val fragment: VerificationBottomSheet = (viewModelContext as FragmentViewModelContext).fragment()
|
||||
|
|
|
@ -17,7 +17,7 @@ package im.vector.app.features.crypto.verification.choose
|
|||
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MavericksState
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
|
@ -94,7 +94,7 @@ class VerificationChooseMethodViewModel @AssistedInject constructor(
|
|||
super.onCleared()
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<VerificationChooseMethodViewModel, VerificationChooseMethodViewState> {
|
||||
companion object : MavericksViewModelFactory<VerificationChooseMethodViewModel, VerificationChooseMethodViewState> {
|
||||
override fun create(viewModelContext: ViewModelContext, state: VerificationChooseMethodViewState): VerificationChooseMethodViewModel? {
|
||||
val fragment: VerificationChooseMethodFragment = (viewModelContext as FragmentViewModelContext).fragment()
|
||||
return fragment.verificationChooseMethodViewModelFactory.create(state)
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
package im.vector.app.features.crypto.verification.conclusion
|
||||
|
||||
import com.airbnb.mvrx.MavericksState
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import im.vector.app.core.platform.EmptyAction
|
||||
import im.vector.app.core.platform.EmptyViewEvents
|
||||
|
@ -38,7 +38,7 @@ enum class ConclusionState {
|
|||
class VerificationConclusionViewModel(initialState: VerificationConclusionViewState)
|
||||
: VectorViewModel<VerificationConclusionViewState, EmptyAction, EmptyViewEvents>(initialState) {
|
||||
|
||||
companion object : MvRxViewModelFactory<VerificationConclusionViewModel, VerificationConclusionViewState> {
|
||||
companion object : MavericksViewModelFactory<VerificationConclusionViewModel, VerificationConclusionViewState> {
|
||||
|
||||
override fun initialState(viewModelContext: ViewModelContext): VerificationConclusionViewState? {
|
||||
val args = viewModelContext.args<VerificationConclusionFragment.Args>()
|
||||
|
|
|
@ -20,7 +20,7 @@ import com.airbnb.mvrx.Fail
|
|||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MavericksState
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
|
@ -155,7 +155,7 @@ class VerificationEmojiCodeViewModel @AssistedInject constructor(
|
|||
fun create(initialState: VerificationEmojiCodeViewState): VerificationEmojiCodeViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<VerificationEmojiCodeViewModel, VerificationEmojiCodeViewState> {
|
||||
companion object : MavericksViewModelFactory<VerificationEmojiCodeViewModel, VerificationEmojiCodeViewState> {
|
||||
|
||||
override fun create(viewModelContext: ViewModelContext, state: VerificationEmojiCodeViewState): VerificationEmojiCodeViewModel? {
|
||||
val factory = (viewModelContext as FragmentViewModelContext).fragment<VerificationEmojiCodeFragment>().viewModelFactory
|
||||
|
|
|
@ -21,7 +21,7 @@ import com.airbnb.mvrx.ActivityViewModelContext
|
|||
import com.airbnb.mvrx.Fail
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.moshi.Types
|
||||
|
@ -56,7 +56,7 @@ class RoomDevToolViewModel @AssistedInject constructor(
|
|||
fun create(initialState: RoomDevToolViewState): RoomDevToolViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<RoomDevToolViewModel, RoomDevToolViewState> {
|
||||
companion object : MavericksViewModelFactory<RoomDevToolViewModel, RoomDevToolViewState> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: RoomDevToolViewState): RoomDevToolViewModel {
|
||||
|
|
|
@ -20,7 +20,7 @@ import com.airbnb.mvrx.Async
|
|||
import com.airbnb.mvrx.Fail
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
|
@ -47,7 +47,7 @@ class DiscoverySettingsViewModel @AssistedInject constructor(
|
|||
fun create(initialState: DiscoverySettingsState): DiscoverySettingsViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<DiscoverySettingsViewModel, DiscoverySettingsState> {
|
||||
companion object : MavericksViewModelFactory<DiscoverySettingsViewModel, DiscoverySettingsState> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: DiscoverySettingsState): DiscoverySettingsViewModel? {
|
||||
|
|
|
@ -17,7 +17,7 @@ package im.vector.app.features.discovery.change
|
|||
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
|
@ -46,7 +46,7 @@ class SetIdentityServerViewModel @AssistedInject constructor(
|
|||
fun create(initialState: SetIdentityServerState): SetIdentityServerViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<SetIdentityServerViewModel, SetIdentityServerState> {
|
||||
companion object : MavericksViewModelFactory<SetIdentityServerViewModel, SetIdentityServerState> {
|
||||
|
||||
override fun initialState(viewModelContext: ViewModelContext): SetIdentityServerState? {
|
||||
val session = (viewModelContext.activity as HasScreenInjector).injector().activeSessionHolder().getActiveSession()
|
||||
|
|
|
@ -18,7 +18,7 @@ package im.vector.app.features.home
|
|||
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.airbnb.mvrx.MvRx
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedFactory
|
||||
|
@ -67,7 +67,7 @@ class HomeActivityViewModel @AssistedInject constructor(
|
|||
fun create(initialState: HomeActivityViewState, args: HomeActivityArgs): HomeActivityViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<HomeActivityViewModel, HomeActivityViewState> {
|
||||
companion object : MavericksViewModelFactory<HomeActivityViewModel, HomeActivityViewState> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: HomeActivityViewState): HomeActivityViewModel? {
|
||||
|
|
|
@ -18,7 +18,7 @@ package im.vector.app.features.home
|
|||
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedFactory
|
||||
|
@ -72,7 +72,7 @@ class HomeDetailViewModel @AssistedInject constructor(@Assisted initialState: Ho
|
|||
fun create(initialState: HomeDetailViewState): HomeDetailViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<HomeDetailViewModel, HomeDetailViewState> {
|
||||
companion object : MavericksViewModelFactory<HomeDetailViewModel, HomeDetailViewState> {
|
||||
|
||||
override fun initialState(viewModelContext: ViewModelContext): HomeDetailViewState? {
|
||||
val uiStateRepository = (viewModelContext.activity as HasScreenInjector).injector().uiStateRepository()
|
||||
|
|
|
@ -19,7 +19,7 @@ package im.vector.app.features.home
|
|||
import com.airbnb.mvrx.ActivityViewModelContext
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MavericksState
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedFactory
|
||||
|
@ -76,7 +76,7 @@ class PromoteRestrictedViewModel @AssistedInject constructor(
|
|||
fun create(initialState: ActiveSpaceViewState): PromoteRestrictedViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<PromoteRestrictedViewModel, ActiveSpaceViewState> {
|
||||
companion object : MavericksViewModelFactory<PromoteRestrictedViewModel, ActiveSpaceViewState> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: ActiveSpaceViewState): PromoteRestrictedViewModel? {
|
||||
|
|
|
@ -20,7 +20,7 @@ import com.airbnb.mvrx.ActivityViewModelContext
|
|||
import com.airbnb.mvrx.Async
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MavericksState
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
|
@ -70,7 +70,7 @@ class UnknownDeviceDetectorSharedViewModel @AssistedInject constructor(@Assisted
|
|||
fun create(initialState: UnknownDevicesState): UnknownDeviceDetectorSharedViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<UnknownDeviceDetectorSharedViewModel, UnknownDevicesState> {
|
||||
companion object : MavericksViewModelFactory<UnknownDeviceDetectorSharedViewModel, UnknownDevicesState> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: UnknownDevicesState): UnknownDeviceDetectorSharedViewModel? {
|
||||
|
|
|
@ -19,7 +19,7 @@ package im.vector.app.features.home
|
|||
import com.airbnb.mvrx.ActivityViewModelContext
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MavericksState
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedFactory
|
||||
|
@ -65,7 +65,7 @@ class UnreadMessagesSharedViewModel @AssistedInject constructor(@Assisted initia
|
|||
fun create(initialState: UnreadMessagesState): UnreadMessagesSharedViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<UnreadMessagesSharedViewModel, UnreadMessagesState> {
|
||||
companion object : MavericksViewModelFactory<UnreadMessagesSharedViewModel, UnreadMessagesState> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: UnreadMessagesState): UnreadMessagesSharedViewModel? {
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
package im.vector.app.features.home.room.breadcrumbs
|
||||
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
|
@ -41,7 +41,7 @@ class BreadcrumbsViewModel @AssistedInject constructor(@Assisted initialState: B
|
|||
fun create(initialState: BreadcrumbsViewState): BreadcrumbsViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<BreadcrumbsViewModel, BreadcrumbsViewState> {
|
||||
companion object : MavericksViewModelFactory<BreadcrumbsViewModel, BreadcrumbsViewState> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: BreadcrumbsViewState): BreadcrumbsViewModel? {
|
||||
|
|
|
@ -23,7 +23,7 @@ import com.airbnb.mvrx.Async
|
|||
import com.airbnb.mvrx.Fail
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
|
@ -165,7 +165,7 @@ class RoomDetailViewModel @AssistedInject constructor(
|
|||
fun create(initialState: RoomDetailViewState): RoomDetailViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<RoomDetailViewModel, RoomDetailViewState> {
|
||||
companion object : MavericksViewModelFactory<RoomDetailViewModel, RoomDetailViewState> {
|
||||
|
||||
const val PAGINATION_COUNT = 50
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ import androidx.lifecycle.viewModelScope
|
|||
import com.airbnb.mvrx.Fail
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
|
@ -50,7 +50,7 @@ class SearchViewModel @AssistedInject constructor(
|
|||
fun create(initialState: SearchViewState): SearchViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<SearchViewModel, SearchViewState> {
|
||||
companion object : MavericksViewModelFactory<SearchViewModel, SearchViewState> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: SearchViewState): SearchViewModel? {
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
package im.vector.app.features.home.room.detail.timeline.action
|
||||
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.Lazy
|
||||
import dagger.assisted.Assisted
|
||||
|
@ -89,7 +89,7 @@ class MessageActionsViewModel @AssistedInject constructor(@Assisted
|
|||
fun create(initialState: MessageActionState): MessageActionsViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<MessageActionsViewModel, MessageActionState> {
|
||||
companion object : MavericksViewModelFactory<MessageActionsViewModel, MessageActionState> {
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: MessageActionState): MessageActionsViewModel? {
|
||||
val fragment: MessageActionsBottomSheet = (viewModelContext as FragmentViewModelContext).fragment()
|
||||
|
|
|
@ -19,7 +19,7 @@ import androidx.lifecycle.viewModelScope
|
|||
import com.airbnb.mvrx.Fail
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
|
@ -51,7 +51,7 @@ class ViewEditHistoryViewModel @AssistedInject constructor(
|
|||
fun create(initialState: ViewEditHistoryViewState): ViewEditHistoryViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<ViewEditHistoryViewModel, ViewEditHistoryViewState> {
|
||||
companion object : MavericksViewModelFactory<ViewEditHistoryViewModel, ViewEditHistoryViewState> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: ViewEditHistoryViewState): ViewEditHistoryViewModel? {
|
||||
|
|
|
@ -19,7 +19,7 @@ package im.vector.app.features.home.room.detail.timeline.reactions
|
|||
import com.airbnb.mvrx.Async
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MavericksState
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
|
@ -74,7 +74,7 @@ class ViewReactionsViewModel @AssistedInject constructor(@Assisted
|
|||
fun create(initialState: DisplayReactionsViewState): ViewReactionsViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<ViewReactionsViewModel, DisplayReactionsViewState> {
|
||||
companion object : MavericksViewModelFactory<ViewReactionsViewModel, DisplayReactionsViewState> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: DisplayReactionsViewState): ViewReactionsViewModel? {
|
||||
|
|
|
@ -19,7 +19,7 @@ package im.vector.app.features.home.room.detail.upgrade
|
|||
import com.airbnb.mvrx.ActivityViewModelContext
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
|
@ -55,7 +55,7 @@ class MigrateRoomViewModel @AssistedInject constructor(
|
|||
fun create(initialState: MigrateRoomViewState): MigrateRoomViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<MigrateRoomViewModel, MigrateRoomViewState> {
|
||||
companion object : MavericksViewModelFactory<MigrateRoomViewModel, MigrateRoomViewState> {
|
||||
|
||||
override fun create(viewModelContext: ViewModelContext, state: MigrateRoomViewState): MigrateRoomViewModel? {
|
||||
val factory = when (viewModelContext) {
|
||||
|
|
|
@ -18,7 +18,7 @@ package im.vector.app.features.homeserver
|
|||
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
|
@ -48,7 +48,7 @@ class HomeServerCapabilitiesViewModel @AssistedInject constructor(
|
|||
fun create(initialState: HomeServerCapabilitiesViewState): HomeServerCapabilitiesViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<HomeServerCapabilitiesViewModel, HomeServerCapabilitiesViewState> {
|
||||
companion object : MavericksViewModelFactory<HomeServerCapabilitiesViewModel, HomeServerCapabilitiesViewState> {
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: HomeServerCapabilitiesViewState): HomeServerCapabilitiesViewModel? {
|
||||
val fragment: UserListFragment = (viewModelContext as FragmentViewModelContext).fragment()
|
||||
|
|
|
@ -23,7 +23,7 @@ import androidx.lifecycle.viewModelScope
|
|||
import com.airbnb.mvrx.ActivityViewModelContext
|
||||
import com.airbnb.mvrx.Fail
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
|
@ -86,7 +86,7 @@ class LoginViewModel @AssistedInject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<LoginViewModel, LoginViewState> {
|
||||
companion object : MavericksViewModelFactory<LoginViewModel, LoginViewState> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: LoginViewState): LoginViewModel? {
|
||||
|
|
|
@ -22,7 +22,7 @@ import androidx.fragment.app.FragmentActivity
|
|||
import androidx.lifecycle.viewModelScope
|
||||
import com.airbnb.mvrx.ActivityViewModelContext
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedFactory
|
||||
|
@ -86,7 +86,7 @@ class LoginViewModel2 @AssistedInject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<LoginViewModel2, LoginViewState2> {
|
||||
companion object : MavericksViewModelFactory<LoginViewModel2, LoginViewState2> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: LoginViewState2): LoginViewModel2? {
|
||||
|
|
|
@ -18,7 +18,7 @@ package im.vector.app.features.login2.created
|
|||
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedFactory
|
||||
|
@ -43,7 +43,7 @@ class AccountCreatedViewModel @AssistedInject constructor(
|
|||
fun create(initialState: AccountCreatedViewState): AccountCreatedViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<AccountCreatedViewModel, AccountCreatedViewState> {
|
||||
companion object : MavericksViewModelFactory<AccountCreatedViewModel, AccountCreatedViewState> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: AccountCreatedViewState): AccountCreatedViewModel? {
|
||||
|
|
|
@ -20,7 +20,7 @@ import androidx.lifecycle.viewModelScope
|
|||
import com.airbnb.mvrx.Fail
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
|
@ -245,7 +245,7 @@ class MatrixToBottomSheetViewModel @AssistedInject constructor(
|
|||
return session.peekRoom(roomIdOrAlias)
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<MatrixToBottomSheetViewModel, MatrixToBottomSheetState> {
|
||||
companion object : MavericksViewModelFactory<MatrixToBottomSheetViewModel, MatrixToBottomSheetState> {
|
||||
override fun create(viewModelContext: ViewModelContext, state: MatrixToBottomSheetState): MatrixToBottomSheetViewModel? {
|
||||
val fragment: MatrixToBottomSheet = (viewModelContext as FragmentViewModelContext).fragment()
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ package im.vector.app.features.rageshake
|
|||
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.airbnb.mvrx.ActivityViewModelContext
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedFactory
|
||||
|
@ -40,7 +40,7 @@ class BugReportViewModel @AssistedInject constructor(
|
|||
fun create(initialState: BugReportState): BugReportViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<BugReportViewModel, BugReportState> {
|
||||
companion object : MavericksViewModelFactory<BugReportViewModel, BugReportState> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: BugReportState): BugReportViewModel? {
|
||||
|
|
|
@ -18,7 +18,7 @@ package im.vector.app.features.reactions
|
|||
import androidx.lifecycle.viewModelScope
|
||||
import com.airbnb.mvrx.ActivityViewModelContext
|
||||
import com.airbnb.mvrx.MavericksState
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedFactory
|
||||
|
@ -44,7 +44,7 @@ class EmojiSearchResultViewModel @AssistedInject constructor(
|
|||
fun create(initialState: EmojiSearchResultViewState): EmojiSearchResultViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<EmojiSearchResultViewModel, EmojiSearchResultViewState> {
|
||||
companion object : MavericksViewModelFactory<EmojiSearchResultViewModel, EmojiSearchResultViewState> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: EmojiSearchResultViewState): EmojiSearchResultViewModel? {
|
||||
|
|
|
@ -18,7 +18,7 @@ package im.vector.app.features.room
|
|||
|
||||
import com.airbnb.mvrx.ActivityViewModelContext
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.jakewharton.rxrelay2.BehaviorRelay
|
||||
import dagger.assisted.Assisted
|
||||
|
@ -54,7 +54,7 @@ class RequireActiveMembershipViewModel @AssistedInject constructor(
|
|||
fun create(initialState: RequireActiveMembershipViewState): RequireActiveMembershipViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<RequireActiveMembershipViewModel, RequireActiveMembershipViewState> {
|
||||
companion object : MavericksViewModelFactory<RequireActiveMembershipViewModel, RequireActiveMembershipViewState> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: RequireActiveMembershipViewState): RequireActiveMembershipViewModel? {
|
||||
|
|
|
@ -20,7 +20,7 @@ import androidx.lifecycle.viewModelScope
|
|||
import com.airbnb.mvrx.ActivityViewModelContext
|
||||
import com.airbnb.mvrx.Fail
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.airbnb.mvrx.appendAt
|
||||
|
@ -53,7 +53,7 @@ class RoomDirectoryViewModel @AssistedInject constructor(
|
|||
fun create(initialState: PublicRoomsViewState): RoomDirectoryViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<RoomDirectoryViewModel, PublicRoomsViewState> {
|
||||
companion object : MavericksViewModelFactory<RoomDirectoryViewModel, PublicRoomsViewState> {
|
||||
private const val PUBLIC_ROOMS_LIMIT = 20
|
||||
|
||||
@JvmStatic
|
||||
|
|
|
@ -21,7 +21,7 @@ import androidx.lifecycle.viewModelScope
|
|||
import com.airbnb.mvrx.Fail
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
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
|
||||
override fun create(viewModelContext: ViewModelContext, state: CreateRoomViewState): CreateRoomViewModel? {
|
||||
|
|
|
@ -20,7 +20,7 @@ import androidx.lifecycle.viewModelScope
|
|||
import com.airbnb.mvrx.Fail
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
|
@ -50,7 +50,7 @@ class RoomDirectoryPickerViewModel @AssistedInject constructor(
|
|||
fun create(initialState: RoomDirectoryPickerViewState): RoomDirectoryPickerViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<RoomDirectoryPickerViewModel, RoomDirectoryPickerViewState> {
|
||||
companion object : MavericksViewModelFactory<RoomDirectoryPickerViewModel, RoomDirectoryPickerViewState> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: RoomDirectoryPickerViewState): RoomDirectoryPickerViewModel? {
|
||||
|
|
|
@ -19,7 +19,7 @@ package im.vector.app.features.roomdirectory.roompreview
|
|||
import androidx.lifecycle.viewModelScope
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
|
@ -52,7 +52,7 @@ class RoomPreviewViewModel @AssistedInject constructor(@Assisted private val ini
|
|||
fun create(initialState: RoomPreviewViewState): RoomPreviewViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<RoomPreviewViewModel, RoomPreviewViewState> {
|
||||
companion object : MavericksViewModelFactory<RoomPreviewViewModel, RoomPreviewViewState> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: RoomPreviewViewState): RoomPreviewViewModel? {
|
||||
|
|
|
@ -20,7 +20,7 @@ package im.vector.app.features.roommemberprofile
|
|||
import com.airbnb.mvrx.Fail
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
|
@ -73,7 +73,7 @@ class RoomMemberProfileViewModel @AssistedInject constructor(@Assisted private v
|
|||
fun create(initialState: RoomMemberProfileViewState): RoomMemberProfileViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<RoomMemberProfileViewModel, RoomMemberProfileViewState> {
|
||||
companion object : MavericksViewModelFactory<RoomMemberProfileViewModel, RoomMemberProfileViewState> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: RoomMemberProfileViewState): RoomMemberProfileViewModel? {
|
||||
|
|
|
@ -20,7 +20,7 @@ import com.airbnb.mvrx.Async
|
|||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MavericksState
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
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
|
||||
override fun create(viewModelContext: ViewModelContext, state: DeviceListViewState): DeviceListBottomSheetViewModel? {
|
||||
val fragment: DeviceListBottomSheet = (viewModelContext as FragmentViewModelContext).fragment()
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
package im.vector.app.features.roomprofile
|
||||
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedFactory
|
||||
|
@ -57,7 +57,7 @@ class RoomProfileViewModel @AssistedInject constructor(
|
|||
fun create(initialState: RoomProfileViewState): RoomProfileViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<RoomProfileViewModel, RoomProfileViewState> {
|
||||
companion object : MavericksViewModelFactory<RoomProfileViewModel, RoomProfileViewState> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: RoomProfileViewState): RoomProfileViewModel? {
|
||||
|
|
|
@ -19,7 +19,7 @@ package im.vector.app.features.roomprofile.alias
|
|||
import com.airbnb.mvrx.Fail
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
|
@ -54,7 +54,7 @@ class RoomAliasViewModel @AssistedInject constructor(@Assisted initialState: Roo
|
|||
fun create(initialState: RoomAliasViewState): RoomAliasViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<RoomAliasViewModel, RoomAliasViewState> {
|
||||
companion object : MavericksViewModelFactory<RoomAliasViewModel, RoomAliasViewState> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: RoomAliasViewState): RoomAliasViewModel? {
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
package im.vector.app.features.roomprofile.alias.detail
|
||||
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
|
@ -36,7 +36,7 @@ class RoomAliasBottomSheetViewModel @AssistedInject constructor(
|
|||
fun create(initialState: RoomAliasBottomSheetState): RoomAliasBottomSheetViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<RoomAliasBottomSheetViewModel, RoomAliasBottomSheetState> {
|
||||
companion object : MavericksViewModelFactory<RoomAliasBottomSheetViewModel, RoomAliasBottomSheetState> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: RoomAliasBottomSheetState): RoomAliasBottomSheetViewModel? {
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
package im.vector.app.features.roomprofile.banned
|
||||
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
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
|
||||
override fun create(viewModelContext: ViewModelContext, state: RoomBannedMemberListViewState): RoomBannedMemberListViewModel? {
|
||||
|
|
|
@ -18,7 +18,7 @@ package im.vector.app.features.roomprofile.members
|
|||
|
||||
import com.airbnb.mvrx.ActivityViewModelContext
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedFactory
|
||||
|
@ -60,7 +60,7 @@ class RoomMemberListViewModel @AssistedInject constructor(@Assisted initialState
|
|||
fun create(initialState: RoomMemberListViewState): RoomMemberListViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<RoomMemberListViewModel, RoomMemberListViewState> {
|
||||
companion object : MavericksViewModelFactory<RoomMemberListViewModel, RoomMemberListViewState> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: RoomMemberListViewState): RoomMemberListViewModel? {
|
||||
|
|
|
@ -18,7 +18,7 @@ package im.vector.app.features.roomprofile.notifications
|
|||
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
|
@ -41,7 +41,7 @@ class RoomNotificationSettingsViewModel @AssistedInject constructor(
|
|||
fun create(initialState: RoomNotificationSettingsViewState): RoomNotificationSettingsViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<RoomNotificationSettingsViewModel, RoomNotificationSettingsViewState> {
|
||||
companion object : MavericksViewModelFactory<RoomNotificationSettingsViewModel, RoomNotificationSettingsViewState> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: RoomNotificationSettingsViewState): RoomNotificationSettingsViewModel {
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
package im.vector.app.features.roomprofile.permissions
|
||||
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
|
@ -46,7 +46,7 @@ class RoomPermissionsViewModel @AssistedInject constructor(@Assisted initialStat
|
|||
fun create(initialState: RoomPermissionsViewState): RoomPermissionsViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<RoomPermissionsViewModel, RoomPermissionsViewState> {
|
||||
companion object : MavericksViewModelFactory<RoomPermissionsViewModel, RoomPermissionsViewState> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: RoomPermissionsViewState): RoomPermissionsViewModel? {
|
||||
|
|
|
@ -19,7 +19,7 @@ package im.vector.app.features.roomprofile.settings
|
|||
import androidx.core.net.toFile
|
||||
import com.airbnb.mvrx.ActivityViewModelContext
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedFactory
|
||||
|
@ -59,7 +59,7 @@ class RoomSettingsViewModel @AssistedInject constructor(@Assisted initialState:
|
|||
fun create(initialState: RoomSettingsViewState): RoomSettingsViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<RoomSettingsViewModel, RoomSettingsViewState> {
|
||||
companion object : MavericksViewModelFactory<RoomSettingsViewModel, RoomSettingsViewState> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: RoomSettingsViewState): RoomSettingsViewModel? {
|
||||
|
|
|
@ -23,7 +23,7 @@ import com.airbnb.mvrx.ActivityViewModelContext
|
|||
import com.airbnb.mvrx.Fail
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
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)
|
||||
: RoomJoinRuleChooseRestrictedViewModel? {
|
||||
|
|
|
@ -21,7 +21,7 @@ import com.airbnb.mvrx.ActivityViewModelContext
|
|||
import com.airbnb.mvrx.Fail
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
|
@ -45,7 +45,7 @@ class RoomUploadsViewModel @AssistedInject constructor(
|
|||
fun create(initialState: RoomUploadsViewState): RoomUploadsViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<RoomUploadsViewModel, RoomUploadsViewState> {
|
||||
companion object : MavericksViewModelFactory<RoomUploadsViewModel, RoomUploadsViewState> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: RoomUploadsViewState): RoomUploadsViewModel? {
|
||||
|
|
|
@ -18,7 +18,7 @@ package im.vector.app.features.settings.account.deactivation
|
|||
import androidx.lifecycle.viewModelScope
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MavericksState
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
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
|
||||
override fun create(viewModelContext: ViewModelContext, state: DeactivateAccountViewState): DeactivateAccountViewModel? {
|
||||
|
|
|
@ -17,7 +17,7 @@ package im.vector.app.features.settings.crosssigning
|
|||
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
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))))
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<CrossSigningSettingsViewModel, CrossSigningSettingsViewState> {
|
||||
companion object : MavericksViewModelFactory<CrossSigningSettingsViewModel, CrossSigningSettingsViewState> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: CrossSigningSettingsViewState): CrossSigningSettingsViewModel? {
|
||||
|
|
|
@ -17,7 +17,7 @@ package im.vector.app.features.settings.devices
|
|||
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
|
@ -88,7 +88,7 @@ class DeviceVerificationInfoBottomSheetViewModel @AssistedInject constructor(@As
|
|||
}
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<DeviceVerificationInfoBottomSheetViewModel, DeviceVerificationInfoBottomSheetViewState> {
|
||||
companion object : MavericksViewModelFactory<DeviceVerificationInfoBottomSheetViewModel, DeviceVerificationInfoBottomSheetViewState> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: DeviceVerificationInfoBottomSheetViewState)
|
||||
|
|
|
@ -22,7 +22,7 @@ import com.airbnb.mvrx.Fail
|
|||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MavericksState
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
|
@ -97,7 +97,7 @@ class DevicesViewModel @AssistedInject constructor(
|
|||
fun create(initialState: DevicesViewState): DevicesViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<DevicesViewModel, DevicesViewState> {
|
||||
companion object : MavericksViewModelFactory<DevicesViewModel, DevicesViewState> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: DevicesViewState): DevicesViewModel? {
|
||||
|
|
|
@ -20,7 +20,6 @@ import com.airbnb.mvrx.Async
|
|||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MavericksState
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
|
|
|
@ -21,7 +21,7 @@ import com.airbnb.mvrx.Async
|
|||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MavericksState
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
|
@ -63,7 +63,7 @@ class GossipingEventsPaperTrailViewModel @AssistedInject constructor(@Assisted i
|
|||
fun create(initialState: GossipingEventsPaperTrailState): GossipingEventsPaperTrailViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<GossipingEventsPaperTrailViewModel, GossipingEventsPaperTrailState> {
|
||||
companion object : MavericksViewModelFactory<GossipingEventsPaperTrailViewModel, GossipingEventsPaperTrailState> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: GossipingEventsPaperTrailState): GossipingEventsPaperTrailViewModel? {
|
||||
|
|
|
@ -21,7 +21,7 @@ import androidx.paging.PagedList
|
|||
import com.airbnb.mvrx.Async
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MavericksState
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
|
@ -71,7 +71,7 @@ class KeyRequestListViewModel @AssistedInject constructor(@Assisted initialState
|
|||
fun create(initialState: KeyRequestListViewState): KeyRequestListViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<KeyRequestListViewModel, KeyRequestListViewState> {
|
||||
companion object : MavericksViewModelFactory<KeyRequestListViewModel, KeyRequestListViewState> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: KeyRequestListViewState): KeyRequestListViewModel? {
|
||||
|
|
|
@ -23,7 +23,7 @@ import com.airbnb.mvrx.Fail
|
|||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MavericksState
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
|
@ -60,7 +60,7 @@ class KeyRequestViewModel @AssistedInject constructor(
|
|||
fun create(initialState: KeyRequestViewState): KeyRequestViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<KeyRequestViewModel, KeyRequestViewState> {
|
||||
companion object : MavericksViewModelFactory<KeyRequestViewModel, KeyRequestViewState> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: KeyRequestViewState): KeyRequestViewModel? {
|
||||
|
|
|
@ -20,7 +20,7 @@ import androidx.lifecycle.viewModelScope
|
|||
import com.airbnb.mvrx.Fail
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
|
@ -41,7 +41,7 @@ class HomeserverSettingsViewModel @AssistedInject constructor(
|
|||
fun create(initialState: HomeServerSettingsViewState): HomeserverSettingsViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<HomeserverSettingsViewModel, HomeServerSettingsViewState> {
|
||||
companion object : MavericksViewModelFactory<HomeserverSettingsViewModel, HomeServerSettingsViewState> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: HomeServerSettingsViewState): HomeserverSettingsViewModel? {
|
||||
|
|
|
@ -22,7 +22,7 @@ import com.airbnb.mvrx.Fail
|
|||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MavericksState
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
|
@ -54,7 +54,7 @@ class IgnoredUsersViewModel @AssistedInject constructor(@Assisted initialState:
|
|||
fun create(initialState: IgnoredUsersViewState): IgnoredUsersViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<IgnoredUsersViewModel, IgnoredUsersViewState> {
|
||||
companion object : MavericksViewModelFactory<IgnoredUsersViewModel, IgnoredUsersViewState> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: IgnoredUsersViewState): IgnoredUsersViewModel? {
|
||||
|
|
|
@ -19,7 +19,7 @@ package im.vector.app.features.settings.locale
|
|||
import androidx.lifecycle.viewModelScope
|
||||
import com.airbnb.mvrx.ActivityViewModelContext
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
|
@ -53,7 +53,7 @@ class LocalePickerViewModel @AssistedInject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<LocalePickerViewModel, LocalePickerViewState> {
|
||||
companion object : MavericksViewModelFactory<LocalePickerViewModel, LocalePickerViewState> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: LocalePickerViewState): LocalePickerViewModel? {
|
||||
|
|
|
@ -20,7 +20,7 @@ import androidx.lifecycle.viewModelScope
|
|||
import com.airbnb.mvrx.Async
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MavericksState
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
|
@ -46,7 +46,7 @@ class PushGatewaysViewModel @AssistedInject constructor(@Assisted initialState:
|
|||
fun create(initialState: PushGatewayViewState): PushGatewaysViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<PushGatewaysViewModel, PushGatewayViewState> {
|
||||
companion object : MavericksViewModelFactory<PushGatewaysViewModel, PushGatewayViewState> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: PushGatewayViewState): PushGatewaysViewModel? {
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
package im.vector.app.features.settings.push
|
||||
|
||||
import com.airbnb.mvrx.MavericksState
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import im.vector.app.core.di.HasScreenInjector
|
||||
import im.vector.app.core.platform.EmptyAction
|
||||
|
@ -31,7 +31,7 @@ data class PushRulesViewState(
|
|||
class PushRulesViewModel(initialState: PushRulesViewState)
|
||||
: VectorViewModel<PushRulesViewState, EmptyAction, EmptyViewEvents>(initialState) {
|
||||
|
||||
companion object : MvRxViewModelFactory<PushRulesViewModel, PushRulesViewState> {
|
||||
companion object : MavericksViewModelFactory<PushRulesViewModel, PushRulesViewState> {
|
||||
|
||||
override fun initialState(viewModelContext: ViewModelContext): PushRulesViewState? {
|
||||
val session = (viewModelContext.activity as HasScreenInjector).injector().activeSessionHolder().getActiveSession()
|
||||
|
|
|
@ -21,7 +21,7 @@ import com.airbnb.mvrx.ActivityViewModelContext
|
|||
import com.airbnb.mvrx.Fail
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedFactory
|
||||
|
@ -84,7 +84,7 @@ class ThreePidsSettingsViewModel @AssistedInject constructor(
|
|||
fun create(initialState: ThreePidsSettingsViewState): ThreePidsSettingsViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<ThreePidsSettingsViewModel, ThreePidsSettingsViewState> {
|
||||
companion object : MavericksViewModelFactory<ThreePidsSettingsViewModel, ThreePidsSettingsViewState> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: ThreePidsSettingsViewState): ThreePidsSettingsViewModel? {
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
package im.vector.app.features.share
|
||||
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.jakewharton.rxrelay2.BehaviorRelay
|
||||
import dagger.assisted.Assisted
|
||||
|
@ -48,7 +48,7 @@ class IncomingShareViewModel @AssistedInject constructor(
|
|||
fun create(initialState: IncomingShareViewState): IncomingShareViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<IncomingShareViewModel, IncomingShareViewState> {
|
||||
companion object : MavericksViewModelFactory<IncomingShareViewModel, IncomingShareViewState> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: IncomingShareViewState): IncomingShareViewModel? {
|
||||
|
|
|
@ -19,7 +19,7 @@ package im.vector.app.features.signout.soft
|
|||
import com.airbnb.mvrx.ActivityViewModelContext
|
||||
import com.airbnb.mvrx.Fail
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
|
@ -51,7 +51,7 @@ class SoftLogoutViewModel @AssistedInject constructor(
|
|||
fun create(initialState: SoftLogoutViewState): SoftLogoutViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<SoftLogoutViewModel, SoftLogoutViewState> {
|
||||
companion object : MavericksViewModelFactory<SoftLogoutViewModel, SoftLogoutViewState> {
|
||||
|
||||
override fun initialState(viewModelContext: ViewModelContext): SoftLogoutViewState? {
|
||||
val activity: SoftLogoutActivity = (viewModelContext as ActivityViewModelContext).activity()
|
||||
|
|
|
@ -20,7 +20,7 @@ import com.airbnb.mvrx.ActivityViewModelContext
|
|||
import com.airbnb.mvrx.Fail
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
|
@ -56,7 +56,7 @@ class SpaceMenuViewModel @AssistedInject constructor(
|
|||
fun create(initialState: SpaceMenuState): SpaceMenuViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<SpaceMenuViewModel, SpaceMenuState> {
|
||||
companion object : MavericksViewModelFactory<SpaceMenuViewModel, SpaceMenuState> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: SpaceMenuState): SpaceMenuViewModel? {
|
||||
|
|
|
@ -19,7 +19,7 @@ package im.vector.app.features.spaces
|
|||
import androidx.lifecycle.viewModelScope
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
|
@ -71,7 +71,7 @@ class SpacesListViewModel @AssistedInject constructor(@Assisted initialState: Sp
|
|||
fun create(initialState: SpaceListViewState): SpacesListViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<SpacesListViewModel, SpaceListViewState> {
|
||||
companion object : MavericksViewModelFactory<SpacesListViewModel, SpaceListViewState> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: SpaceListViewState): SpacesListViewModel {
|
||||
|
|
|
@ -21,7 +21,7 @@ import com.airbnb.mvrx.ActivityViewModelContext
|
|||
import com.airbnb.mvrx.Fail
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
|
@ -93,7 +93,7 @@ class CreateSpaceViewModel @AssistedInject constructor(
|
|||
super.onCleared()
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<CreateSpaceViewModel, CreateSpaceState> {
|
||||
companion object : MavericksViewModelFactory<CreateSpaceViewModel, CreateSpaceState> {
|
||||
|
||||
override fun create(viewModelContext: ViewModelContext, state: CreateSpaceState): CreateSpaceViewModel? {
|
||||
val factory = when (viewModelContext) {
|
||||
|
|
|
@ -20,7 +20,7 @@ import com.airbnb.mvrx.ActivityViewModelContext
|
|||
import com.airbnb.mvrx.Fail
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
|
@ -55,7 +55,7 @@ class SpaceDirectoryViewModel @AssistedInject constructor(
|
|||
fun create(initialState: SpaceDirectoryState): SpaceDirectoryViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<SpaceDirectoryViewModel, SpaceDirectoryState> {
|
||||
companion object : MavericksViewModelFactory<SpaceDirectoryViewModel, SpaceDirectoryState> {
|
||||
override fun create(viewModelContext: ViewModelContext, state: SpaceDirectoryState): SpaceDirectoryViewModel? {
|
||||
val factory = when (viewModelContext) {
|
||||
is FragmentViewModelContext -> viewModelContext.fragment as? Factory
|
||||
|
|
|
@ -21,7 +21,7 @@ import com.airbnb.mvrx.ActivityViewModelContext
|
|||
import com.airbnb.mvrx.Fail
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
|
@ -97,7 +97,7 @@ class SpaceInviteBottomSheetViewModel @AssistedInject constructor(
|
|||
fun create(initialState: SpaceInviteBottomSheetState): SpaceInviteBottomSheetViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<SpaceInviteBottomSheetViewModel, SpaceInviteBottomSheetState> {
|
||||
companion object : MavericksViewModelFactory<SpaceInviteBottomSheetViewModel, SpaceInviteBottomSheetState> {
|
||||
|
||||
override fun create(viewModelContext: ViewModelContext, state: SpaceInviteBottomSheetState): SpaceInviteBottomSheetViewModel? {
|
||||
val factory = when (viewModelContext) {
|
||||
|
|
|
@ -21,7 +21,7 @@ import com.airbnb.mvrx.ActivityViewModelContext
|
|||
import com.airbnb.mvrx.Fail
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
|
@ -129,7 +129,7 @@ class SpaceLeaveAdvancedViewModel @AssistedInject constructor(
|
|||
fun create(initialState: SpaceLeaveAdvanceViewState): SpaceLeaveAdvancedViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<SpaceLeaveAdvancedViewModel, SpaceLeaveAdvanceViewState> {
|
||||
companion object : MavericksViewModelFactory<SpaceLeaveAdvancedViewModel, SpaceLeaveAdvanceViewState> {
|
||||
override fun create(viewModelContext: ViewModelContext, state: SpaceLeaveAdvanceViewState): SpaceLeaveAdvancedViewModel? {
|
||||
val factory = when (viewModelContext) {
|
||||
is FragmentViewModelContext -> viewModelContext.fragment as? Factory
|
||||
|
|
|
@ -23,7 +23,7 @@ import com.airbnb.mvrx.ActivityViewModelContext
|
|||
import com.airbnb.mvrx.Fail
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
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? {
|
||||
val factory = when (viewModelContext) {
|
||||
is FragmentViewModelContext -> viewModelContext.fragment as? Factory
|
||||
|
|
|
@ -21,7 +21,7 @@ import com.airbnb.mvrx.ActivityViewModelContext
|
|||
import com.airbnb.mvrx.Fail
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
|
@ -60,7 +60,7 @@ class SpaceManageRoomsViewModel @AssistedInject constructor(
|
|||
fun create(initialState: SpaceManageRoomViewState): SpaceManageRoomsViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<SpaceManageRoomsViewModel, SpaceManageRoomViewState> {
|
||||
companion object : MavericksViewModelFactory<SpaceManageRoomsViewModel, SpaceManageRoomViewState> {
|
||||
override fun create(viewModelContext: ViewModelContext, state: SpaceManageRoomViewState): SpaceManageRoomsViewModel? {
|
||||
val factory = when (viewModelContext) {
|
||||
is FragmentViewModelContext -> viewModelContext.fragment as? Factory
|
||||
|
|
|
@ -18,7 +18,7 @@ package im.vector.app.features.spaces.manage
|
|||
|
||||
import com.airbnb.mvrx.ActivityViewModelContext
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedFactory
|
||||
|
@ -37,7 +37,7 @@ class SpaceManageSharedViewModel @AssistedInject constructor(
|
|||
fun create(initialState: SpaceManageViewState): SpaceManageSharedViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<SpaceManageSharedViewModel, SpaceManageViewState> {
|
||||
companion object : MavericksViewModelFactory<SpaceManageSharedViewModel, SpaceManageViewState> {
|
||||
override fun create(viewModelContext: ViewModelContext, state: SpaceManageViewState): SpaceManageSharedViewModel? {
|
||||
val factory = when (viewModelContext) {
|
||||
is FragmentViewModelContext -> viewModelContext.fragment as? Factory
|
||||
|
|
|
@ -21,7 +21,7 @@ import com.airbnb.mvrx.ActivityViewModelContext
|
|||
import com.airbnb.mvrx.Fail
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
|
@ -48,7 +48,7 @@ class SpacePeopleViewModel @AssistedInject constructor(
|
|||
fun create(initialState: SpacePeopleViewState): SpacePeopleViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<SpacePeopleViewModel, SpacePeopleViewState> {
|
||||
companion object : MavericksViewModelFactory<SpacePeopleViewModel, SpacePeopleViewState> {
|
||||
override fun create(viewModelContext: ViewModelContext, state: SpacePeopleViewState): SpacePeopleViewModel? {
|
||||
val factory = when (viewModelContext) {
|
||||
is FragmentViewModelContext -> viewModelContext.fragment as? Factory
|
||||
|
|
|
@ -21,7 +21,7 @@ import com.airbnb.mvrx.ActivityViewModelContext
|
|||
import com.airbnb.mvrx.Fail
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
|
@ -62,7 +62,7 @@ class SpacePreviewViewModel @AssistedInject constructor(
|
|||
fun create(initialState: SpacePreviewState): SpacePreviewViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<SpacePreviewViewModel, SpacePreviewState> {
|
||||
companion object : MavericksViewModelFactory<SpacePreviewViewModel, SpacePreviewState> {
|
||||
override fun create(viewModelContext: ViewModelContext, state: SpacePreviewState): SpacePreviewViewModel? {
|
||||
val factory = when (viewModelContext) {
|
||||
is FragmentViewModelContext -> viewModelContext.fragment as? Factory
|
||||
|
|
|
@ -18,7 +18,7 @@ package im.vector.app.features.spaces.share
|
|||
|
||||
import com.airbnb.mvrx.ActivityViewModelContext
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
|
@ -42,7 +42,7 @@ class ShareSpaceViewModel @AssistedInject constructor(
|
|||
fun create(initialState: ShareSpaceViewState): ShareSpaceViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<ShareSpaceViewModel, ShareSpaceViewState> {
|
||||
companion object : MavericksViewModelFactory<ShareSpaceViewModel, ShareSpaceViewState> {
|
||||
override fun create(viewModelContext: ViewModelContext, state: ShareSpaceViewState): ShareSpaceViewModel? {
|
||||
val factory = when (viewModelContext) {
|
||||
is FragmentViewModelContext -> viewModelContext.fragment as? Factory
|
||||
|
|
|
@ -18,7 +18,7 @@ package im.vector.app.features.terms
|
|||
import androidx.lifecycle.viewModelScope
|
||||
import com.airbnb.mvrx.ActivityViewModelContext
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
|
@ -41,7 +41,7 @@ class ReviewTermsViewModel @AssistedInject constructor(
|
|||
fun create(initialState: ReviewTermsViewState): ReviewTermsViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<ReviewTermsViewModel, ReviewTermsViewState> {
|
||||
companion object : MavericksViewModelFactory<ReviewTermsViewModel, ReviewTermsViewState> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: ReviewTermsViewState): ReviewTermsViewModel? {
|
||||
|
|
|
@ -19,7 +19,7 @@ package im.vector.app.features.usercode
|
|||
import androidx.lifecycle.viewModelScope
|
||||
import com.airbnb.mvrx.ActivityViewModelContext
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
|
@ -45,7 +45,7 @@ class UserCodeSharedViewModel @AssistedInject constructor(
|
|||
private val directRoomHelper: DirectRoomHelper,
|
||||
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? {
|
||||
val factory = when (viewModelContext) {
|
||||
is FragmentViewModelContext -> viewModelContext.fragment as? Factory
|
||||
|
|
|
@ -18,7 +18,7 @@ package im.vector.app.features.userdirectory
|
|||
|
||||
import com.airbnb.mvrx.ActivityViewModelContext
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.jakewharton.rxrelay2.BehaviorRelay
|
||||
|
@ -63,7 +63,7 @@ class UserListViewModel @AssistedInject constructor(@Assisted initialState: User
|
|||
fun create(initialState: UserListViewState): UserListViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<UserListViewModel, UserListViewState> {
|
||||
companion object : MavericksViewModelFactory<UserListViewModel, UserListViewState> {
|
||||
|
||||
override fun create(viewModelContext: ViewModelContext, state: UserListViewState): UserListViewModel? {
|
||||
val factory = when (viewModelContext) {
|
||||
|
|
|
@ -22,7 +22,7 @@ import com.airbnb.mvrx.ActivityViewModelContext
|
|||
import com.airbnb.mvrx.Fail
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
|
@ -60,7 +60,7 @@ class WidgetViewModel @AssistedInject constructor(@Assisted val initialState: Wi
|
|||
fun create(initialState: WidgetViewState): WidgetViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<WidgetViewModel, WidgetViewState> {
|
||||
companion object : MavericksViewModelFactory<WidgetViewModel, WidgetViewState> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: WidgetViewState): WidgetViewModel? {
|
||||
|
|
|
@ -18,7 +18,7 @@ package im.vector.app.features.widgets.permissions
|
|||
import androidx.lifecycle.viewModelScope
|
||||
import com.airbnb.mvrx.ActivityViewModelContext
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
|
@ -144,7 +144,7 @@ class RoomWidgetPermissionViewModel @AssistedInject constructor(@Assisted val in
|
|||
fun create(initialState: RoomWidgetPermissionViewState): RoomWidgetPermissionViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<RoomWidgetPermissionViewModel, RoomWidgetPermissionViewState> {
|
||||
companion object : MavericksViewModelFactory<RoomWidgetPermissionViewModel, RoomWidgetPermissionViewState> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: RoomWidgetPermissionViewState): RoomWidgetPermissionViewModel? {
|
||||
|
|
|
@ -21,7 +21,7 @@ import com.airbnb.mvrx.ActivityViewModelContext
|
|||
import com.airbnb.mvrx.Async
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MavericksState
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
|
@ -75,7 +75,7 @@ class ServerBackupStatusViewModel @AssistedInject constructor(@Assisted initialS
|
|||
fun create(initialState: ServerBackupStatusViewState): ServerBackupStatusViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<ServerBackupStatusViewModel, ServerBackupStatusViewState> {
|
||||
companion object : MavericksViewModelFactory<ServerBackupStatusViewModel, ServerBackupStatusViewState> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: ServerBackupStatusViewState): ServerBackupStatusViewModel? {
|
||||
|
|
|
@ -23,7 +23,7 @@ import com.airbnb.mvrx.Async
|
|||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MavericksState
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
|
@ -69,7 +69,7 @@ class SignoutCheckViewModel @AssistedInject constructor(
|
|||
fun create(initialState: SignoutCheckViewState): SignoutCheckViewModel
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<SignoutCheckViewModel, SignoutCheckViewState> {
|
||||
companion object : MavericksViewModelFactory<SignoutCheckViewModel, SignoutCheckViewState> {
|
||||
|
||||
@JvmStatic
|
||||
override fun create(viewModelContext: ViewModelContext, state: SignoutCheckViewState): SignoutCheckViewModel? {
|
||||
|
|
Loading…
Reference in a new issue