Hilt: clean code and add changelog

This commit is contained in:
ganfra 2021-10-22 12:41:06 +02:00
parent e9b58844b3
commit e6e8c7f7d1
147 changed files with 89 additions and 276 deletions

1
changelog.d/3888.misc Normal file
View file

@ -0,0 +1 @@
Migrate app DI framework to Hilt

View file

@ -27,7 +27,6 @@ import androidx.core.content.getSystemService
import dagger.hilt.android.AndroidEntryPoint import dagger.hilt.android.AndroidEntryPoint
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.di.ActiveSessionHolder import im.vector.app.core.di.ActiveSessionHolder
import im.vector.app.core.extensions.registerStartForActivityResult import im.vector.app.core.extensions.registerStartForActivityResult
import im.vector.app.core.platform.VectorBaseActivity import im.vector.app.core.platform.VectorBaseActivity
import im.vector.app.core.utils.PERMISSIONS_FOR_TAKING_PHOTO import im.vector.app.core.utils.PERMISSIONS_FOR_TAKING_PHOTO

View file

@ -17,7 +17,6 @@ package im.vector.app.gplay.features.settings.troubleshoot
import android.content.Intent import android.content.Intent
import androidx.activity.result.ActivityResultLauncher import androidx.activity.result.ActivityResultLauncher
import androidx.appcompat.app.AppCompatActivity
import androidx.fragment.app.FragmentActivity import androidx.fragment.app.FragmentActivity
import com.google.firebase.messaging.FirebaseMessaging import com.google.firebase.messaging.FirebaseMessaging
import im.vector.app.R import im.vector.app.R

View file

@ -17,7 +17,6 @@ package im.vector.app.gplay.features.settings.troubleshoot
import android.content.Intent import android.content.Intent
import androidx.activity.result.ActivityResultLauncher import androidx.activity.result.ActivityResultLauncher
import androidx.appcompat.app.AppCompatActivity
import androidx.fragment.app.FragmentActivity import androidx.fragment.app.FragmentActivity
import com.google.android.gms.common.ConnectionResult import com.google.android.gms.common.ConnectionResult
import com.google.android.gms.common.GoogleApiAvailability import com.google.android.gms.common.GoogleApiAvailability

View file

@ -17,7 +17,6 @@ package im.vector.app.gplay.features.settings.troubleshoot
import android.content.Intent import android.content.Intent
import androidx.activity.result.ActivityResultLauncher import androidx.activity.result.ActivityResultLauncher
import androidx.appcompat.app.AppCompatActivity
import androidx.fragment.app.FragmentActivity import androidx.fragment.app.FragmentActivity
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.di.ActiveSessionHolder import im.vector.app.core.di.ActiveSessionHolder

View file

@ -17,7 +17,6 @@ package im.vector.app.gplay.features.settings.troubleshoot
import android.content.Intent import android.content.Intent
import androidx.activity.result.ActivityResultLauncher import androidx.activity.result.ActivityResultLauncher
import androidx.appcompat.app.AppCompatActivity
import androidx.fragment.app.FragmentActivity import androidx.fragment.app.FragmentActivity
import androidx.lifecycle.Observer import androidx.lifecycle.Observer
import androidx.work.WorkInfo import androidx.work.WorkInfo

View file

@ -23,7 +23,6 @@ import dagger.Binds
import dagger.Module import dagger.Module
import dagger.hilt.InstallIn import dagger.hilt.InstallIn
import dagger.hilt.android.components.ActivityComponent import dagger.hilt.android.components.ActivityComponent
import dagger.hilt.migration.DisableInstallInCheck
import dagger.multibindings.IntoMap import dagger.multibindings.IntoMap
import im.vector.app.features.attachments.preview.AttachmentsPreviewFragment import im.vector.app.features.attachments.preview.AttachmentsPreviewFragment
import im.vector.app.features.contactsbook.ContactsBookFragment import im.vector.app.features.contactsbook.ContactsBookFragment

View file

@ -63,7 +63,6 @@ class HiltMavericksViewModelFactory<VM : MavericksViewModel<S>, S : MavericksSta
override fun initialState(viewModelContext: ViewModelContext): S? { override fun initialState(viewModelContext: ViewModelContext): S? {
return super.initialState(viewModelContext) return super.initialState(viewModelContext)
} }
} }
/** /**

View file

@ -33,5 +33,4 @@ object HomeModule {
fun providesTimelineBackgroundHandler(): Handler { fun providesTimelineBackgroundHandler(): Handler {
return TimelineAsyncHelper.getBackgroundHandler() return TimelineAsyncHelper.getBackgroundHandler()
} }
} }

View file

@ -21,7 +21,6 @@ import com.bumptech.glide.Glide
import com.bumptech.glide.load.model.GlideUrl import com.bumptech.glide.load.model.GlideUrl
import com.github.piasy.biv.BigImageViewer import com.github.piasy.biv.BigImageViewer
import com.github.piasy.biv.loader.glide.GlideImageLoader import com.github.piasy.biv.loader.glide.GlideImageLoader
import dagger.hilt.android.qualifiers.ApplicationContext
import im.vector.app.ActiveSessionDataSource import im.vector.app.ActiveSessionDataSource
import im.vector.app.core.glide.FactoryUrl import im.vector.app.core.glide.FactoryUrl
import org.matrix.android.sdk.api.session.Session import org.matrix.android.sdk.api.session.Session

View file

@ -41,7 +41,6 @@ import im.vector.app.features.home.PromoteRestrictedViewModel
import im.vector.app.features.home.UnknownDeviceDetectorSharedViewModel import im.vector.app.features.home.UnknownDeviceDetectorSharedViewModel
import im.vector.app.features.home.UnreadMessagesSharedViewModel import im.vector.app.features.home.UnreadMessagesSharedViewModel
import im.vector.app.features.home.room.breadcrumbs.BreadcrumbsViewModel import im.vector.app.features.home.room.breadcrumbs.BreadcrumbsViewModel
import im.vector.app.features.home.room.detail.RoomDetailViewModel
import im.vector.app.features.home.room.detail.composer.TextComposerViewModel import im.vector.app.features.home.room.detail.composer.TextComposerViewModel
import im.vector.app.features.home.room.detail.search.SearchViewModel import im.vector.app.features.home.room.detail.search.SearchViewModel
import im.vector.app.features.home.room.detail.timeline.action.MessageActionsViewModel import im.vector.app.features.home.room.detail.timeline.action.MessageActionsViewModel
@ -541,6 +540,4 @@ interface MavericksViewModelModule {
@IntoMap @IntoMap
@MavericksViewModelKey(VerificationBottomSheetViewModel::class) @MavericksViewModelKey(VerificationBottomSheetViewModel::class)
fun verificationBottomSheetViewModelFactory(factory: VerificationBottomSheetViewModel.Factory): MavericksAssistedViewModelFactory<*, *> fun verificationBottomSheetViewModelFactory(factory: VerificationBottomSheetViewModel.Factory): MavericksAssistedViewModelFactory<*, *>
} }

View file

@ -38,7 +38,6 @@ import com.jakewharton.rxbinding3.view.clicks
import dagger.hilt.android.EntryPointAccessors import dagger.hilt.android.EntryPointAccessors
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.di.ActivityEntryPoint import im.vector.app.core.di.ActivityEntryPoint
import im.vector.app.core.dialogs.UnrecognizedCertificateDialog import im.vector.app.core.dialogs.UnrecognizedCertificateDialog
import im.vector.app.core.error.ErrorFormatter import im.vector.app.core.error.ErrorFormatter
import im.vector.app.core.extensions.singletonEntryPoint import im.vector.app.core.extensions.singletonEntryPoint
@ -95,7 +94,7 @@ abstract class VectorBaseFragment<VB : ViewBinding> : Fragment(), MavericksView
override fun onAttach(context: Context) { override fun onAttach(context: Context) {
val singletonEntryPoint = context.singletonEntryPoint() val singletonEntryPoint = context.singletonEntryPoint()
val activityEntryPoint = EntryPointAccessors.fromActivity(vectorBaseActivity,ActivityEntryPoint::class.java) val activityEntryPoint = EntryPointAccessors.fromActivity(vectorBaseActivity, ActivityEntryPoint::class.java)
navigator = singletonEntryPoint.navigator() navigator = singletonEntryPoint.navigator()
errorFormatter = singletonEntryPoint.errorFormatter() errorFormatter = singletonEntryPoint.errorFormatter()
unrecognizedCertificateDialog = singletonEntryPoint.unrecognizedCertificateDialog() unrecognizedCertificateDialog = singletonEntryPoint.unrecognizedCertificateDialog()

View file

@ -27,7 +27,6 @@ import com.google.android.material.dialog.MaterialAlertDialogBuilder
import dagger.hilt.android.AndroidEntryPoint import dagger.hilt.android.AndroidEntryPoint
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.di.ActiveSessionHolder import im.vector.app.core.di.ActiveSessionHolder
import im.vector.app.core.error.ErrorFormatter import im.vector.app.core.error.ErrorFormatter
import im.vector.app.core.extensions.startSyncing import im.vector.app.core.extensions.startSyncing
import im.vector.app.core.platform.VectorBaseActivity import im.vector.app.core.platform.VectorBaseActivity

View file

@ -31,7 +31,6 @@ import com.airbnb.mvrx.viewModel
import com.airbnb.mvrx.withState import com.airbnb.mvrx.withState
import dagger.hilt.android.AndroidEntryPoint import dagger.hilt.android.AndroidEntryPoint
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.extensions.addFragment import im.vector.app.core.extensions.addFragment
import im.vector.app.core.platform.SimpleFragmentActivity import im.vector.app.core.platform.SimpleFragmentActivity
import im.vector.app.core.utils.openUrlInChromeCustomTab import im.vector.app.core.utils.openUrlInChromeCustomTab
@ -44,7 +43,7 @@ import timber.log.Timber
import javax.inject.Inject import javax.inject.Inject
@AndroidEntryPoint @AndroidEntryPoint
class ReAuthActivity : SimpleFragmentActivity(){ class ReAuthActivity : SimpleFragmentActivity() {
@Parcelize @Parcelize
data class Args( data class Args(

View file

@ -16,10 +16,7 @@
package im.vector.app.features.auth package im.vector.app.features.auth
import com.airbnb.mvrx.ActivityViewModelContext
import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.MavericksViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory import dagger.assisted.AssistedFactory
import dagger.assisted.AssistedInject import dagger.assisted.AssistedInject
@ -37,7 +34,7 @@ class ReAuthViewModel @AssistedInject constructor(
) : VectorViewModel<ReAuthState, ReAuthActions, ReAuthEvents>(initialState) { ) : VectorViewModel<ReAuthState, ReAuthActions, ReAuthEvents>(initialState) {
@AssistedFactory @AssistedFactory
interface Factory: MavericksAssistedViewModelFactory<ReAuthViewModel,ReAuthState> { interface Factory : MavericksAssistedViewModelFactory<ReAuthViewModel, ReAuthState> {
override fun create(initialState: ReAuthState): ReAuthViewModel override fun create(initialState: ReAuthState): ReAuthViewModel
} }

View file

@ -95,7 +95,6 @@ class VectorCallActivity : VectorBaseActivity<ActivityCallBinding>(), CallContro
private val callViewModel: VectorCallViewModel by viewModel() private val callViewModel: VectorCallViewModel by viewModel()
private val dialPadCallback = object : DialPadFragment.Callback { private val dialPadCallback = object : DialPadFragment.Callback {
override fun onDigitAppended(digit: String) { override fun onDigitAppended(digit: String) {
callViewModel.handle(VectorCallViewActions.SendDtmfDigit(digit)) callViewModel.handle(VectorCallViewActions.SendDtmfDigit(digit))

View file

@ -21,7 +21,6 @@ import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MavericksViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory import dagger.assisted.AssistedFactory
import dagger.assisted.AssistedInject import dagger.assisted.AssistedInject
@ -343,7 +342,7 @@ class VectorCallViewModel @AssistedInject constructor(
} }
@AssistedFactory @AssistedFactory
interface Factory: MavericksAssistedViewModelFactory<VectorCallViewModel,VectorCallViewState> { interface Factory : MavericksAssistedViewModelFactory<VectorCallViewModel, VectorCallViewState> {
override fun create(initialState: VectorCallViewState): VectorCallViewModel override fun create(initialState: VectorCallViewState): VectorCallViewModel
} }

View file

@ -22,7 +22,6 @@ import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.MavericksViewModelFactory 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 dagger.assisted.Assisted import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory import dagger.assisted.AssistedFactory
import dagger.assisted.AssistedInject import dagger.assisted.AssistedInject
@ -48,7 +47,7 @@ class JitsiCallViewModel @AssistedInject constructor(
) : VectorViewModel<JitsiCallViewState, JitsiCallViewActions, JitsiCallViewEvents>(initialState) { ) : VectorViewModel<JitsiCallViewState, JitsiCallViewActions, JitsiCallViewEvents>(initialState) {
@AssistedFactory @AssistedFactory
interface Factory: MavericksAssistedViewModelFactory<JitsiCallViewModel,JitsiCallViewState> { interface Factory : MavericksAssistedViewModelFactory<JitsiCallViewModel, JitsiCallViewState> {
override fun create(initialState: JitsiCallViewState): JitsiCallViewModel override fun create(initialState: JitsiCallViewState): JitsiCallViewModel
} }
@ -148,6 +147,4 @@ class JitsiCallViewModel @AssistedInject constructor(
companion object : MavericksViewModelFactory<JitsiCallViewModel, JitsiCallViewState> by hiltMavericksViewModelFactory() { companion object : MavericksViewModelFactory<JitsiCallViewModel, JitsiCallViewState> by hiltMavericksViewModelFactory() {
const val ENABLE_VIDEO_OPTION = "ENABLE_VIDEO_OPTION" const val ENABLE_VIDEO_OPTION = "ENABLE_VIDEO_OPTION"
} }
} }

View file

@ -28,10 +28,9 @@ data class JitsiCallViewState(
val widget: Async<Widget> = Uninitialized val widget: Async<Widget> = Uninitialized
) : MavericksState { ) : MavericksState {
constructor(args: VectorJitsiActivity.Args): this( constructor(args: VectorJitsiActivity.Args) : this(
roomId = args.roomId, roomId = args.roomId,
widgetId = args.widgetId, widgetId = args.widgetId,
enableVideo = args.enableVideo enableVideo = args.enableVideo
) )
} }

View file

@ -35,7 +35,6 @@ import com.facebook.react.modules.core.PermissionListener
import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.dialog.MaterialAlertDialogBuilder
import dagger.hilt.android.AndroidEntryPoint import dagger.hilt.android.AndroidEntryPoint
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.extensions.exhaustive import im.vector.app.core.extensions.exhaustive
import im.vector.app.core.platform.VectorBaseActivity import im.vector.app.core.platform.VectorBaseActivity
import im.vector.app.databinding.ActivityJitsiBinding import im.vector.app.databinding.ActivityJitsiBinding
@ -49,7 +48,6 @@ import org.matrix.android.sdk.api.extensions.tryOrNull
import org.matrix.android.sdk.api.util.JsonDict import org.matrix.android.sdk.api.util.JsonDict
import timber.log.Timber import timber.log.Timber
import java.net.URL import java.net.URL
import javax.inject.Inject
@AndroidEntryPoint @AndroidEntryPoint
class VectorJitsiActivity : VectorBaseActivity<ActivityJitsiBinding>(), JitsiMeetActivityInterface { class VectorJitsiActivity : VectorBaseActivity<ActivityJitsiBinding>(), JitsiMeetActivityInterface {

View file

@ -25,14 +25,9 @@ import com.airbnb.mvrx.viewModel
import com.google.android.material.tabs.TabLayoutMediator import com.google.android.material.tabs.TabLayoutMediator
import dagger.hilt.android.AndroidEntryPoint import dagger.hilt.android.AndroidEntryPoint
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.error.ErrorFormatter import im.vector.app.core.error.ErrorFormatter
import im.vector.app.core.platform.VectorBaseActivity import im.vector.app.core.platform.VectorBaseActivity
import im.vector.app.databinding.ActivityCallTransferBinding import im.vector.app.databinding.ActivityCallTransferBinding
import im.vector.app.features.contactsbook.ContactsBookViewModel
import im.vector.app.features.contactsbook.ContactsBookViewState
import im.vector.app.features.userdirectory.UserListViewModel
import im.vector.app.features.userdirectory.UserListViewState
import kotlinx.parcelize.Parcelize import kotlinx.parcelize.Parcelize
import javax.inject.Inject import javax.inject.Inject

View file

@ -40,7 +40,7 @@ class CallTransferViewModel @AssistedInject constructor(@Assisted initialState:
VectorViewModel<CallTransferViewState, CallTransferAction, CallTransferViewEvents>(initialState) { VectorViewModel<CallTransferViewState, CallTransferAction, CallTransferViewEvents>(initialState) {
@AssistedFactory @AssistedFactory
interface Factory: MavericksAssistedViewModelFactory<CallTransferViewModel,CallTransferViewState> { interface Factory : MavericksAssistedViewModelFactory<CallTransferViewModel, CallTransferViewState> {
override fun create(initialState: CallTransferViewState): CallTransferViewModel override fun create(initialState: CallTransferViewState): CallTransferViewModel
} }

View file

@ -17,12 +17,9 @@
package im.vector.app.features.contactsbook package im.vector.app.features.contactsbook
import androidx.lifecycle.viewModelScope import androidx.lifecycle.viewModelScope
import com.airbnb.mvrx.ActivityViewModelContext
import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MavericksViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory import dagger.assisted.AssistedFactory
import dagger.assisted.AssistedInject import dagger.assisted.AssistedInject
@ -47,7 +44,7 @@ class ContactsBookViewModel @AssistedInject constructor(@Assisted
VectorViewModel<ContactsBookViewState, ContactsBookAction, EmptyViewEvents>(initialState) { VectorViewModel<ContactsBookViewState, ContactsBookAction, EmptyViewEvents>(initialState) {
@AssistedFactory @AssistedFactory
interface Factory: MavericksAssistedViewModelFactory<ContactsBookViewModel,ContactsBookViewState> { interface Factory : MavericksAssistedViewModelFactory<ContactsBookViewModel, ContactsBookViewState> {
override fun create(initialState: ContactsBookViewState): ContactsBookViewModel override fun create(initialState: ContactsBookViewState): ContactsBookViewModel
} }

View file

@ -30,7 +30,6 @@ import com.airbnb.mvrx.viewModel
import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.dialog.MaterialAlertDialogBuilder
import dagger.hilt.android.AndroidEntryPoint import dagger.hilt.android.AndroidEntryPoint
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.error.ErrorFormatter import im.vector.app.core.error.ErrorFormatter
import im.vector.app.core.extensions.addFragment import im.vector.app.core.extensions.addFragment
import im.vector.app.core.extensions.addFragmentToBackstack import im.vector.app.core.extensions.addFragmentToBackstack
@ -43,21 +42,17 @@ import im.vector.app.core.utils.checkPermissions
import im.vector.app.core.utils.onPermissionDeniedSnackbar import im.vector.app.core.utils.onPermissionDeniedSnackbar
import im.vector.app.core.utils.registerForPermissionsResult import im.vector.app.core.utils.registerForPermissionsResult
import im.vector.app.features.contactsbook.ContactsBookFragment import im.vector.app.features.contactsbook.ContactsBookFragment
import im.vector.app.features.contactsbook.ContactsBookViewModel
import im.vector.app.features.contactsbook.ContactsBookViewState
import im.vector.app.features.userdirectory.UserListFragment import im.vector.app.features.userdirectory.UserListFragment
import im.vector.app.features.userdirectory.UserListFragmentArgs import im.vector.app.features.userdirectory.UserListFragmentArgs
import im.vector.app.features.userdirectory.UserListSharedAction import im.vector.app.features.userdirectory.UserListSharedAction
import im.vector.app.features.userdirectory.UserListSharedActionViewModel import im.vector.app.features.userdirectory.UserListSharedActionViewModel
import im.vector.app.features.userdirectory.UserListViewModel
import im.vector.app.features.userdirectory.UserListViewState
import org.matrix.android.sdk.api.failure.Failure import org.matrix.android.sdk.api.failure.Failure
import org.matrix.android.sdk.api.session.room.failure.CreateRoomFailure import org.matrix.android.sdk.api.session.room.failure.CreateRoomFailure
import java.net.HttpURLConnection import java.net.HttpURLConnection
import javax.inject.Inject import javax.inject.Inject
@AndroidEntryPoint @AndroidEntryPoint
class CreateDirectRoomActivity : SimpleFragmentActivity(){ class CreateDirectRoomActivity : SimpleFragmentActivity() {
private val viewModel: CreateDirectRoomViewModel by viewModel() private val viewModel: CreateDirectRoomViewModel by viewModel()
private lateinit var sharedActionViewModel: UserListSharedActionViewModel private lateinit var sharedActionViewModel: UserListSharedActionViewModel

View file

@ -43,7 +43,7 @@ class CreateDirectRoomViewModel @AssistedInject constructor(@Assisted
VectorViewModel<CreateDirectRoomViewState, CreateDirectRoomAction, CreateDirectRoomViewEvents>(initialState) { VectorViewModel<CreateDirectRoomViewState, CreateDirectRoomAction, CreateDirectRoomViewEvents>(initialState) {
@AssistedFactory @AssistedFactory
interface Factory: MavericksAssistedViewModelFactory<CreateDirectRoomViewModel,CreateDirectRoomViewState> { interface Factory : MavericksAssistedViewModelFactory<CreateDirectRoomViewModel, CreateDirectRoomViewState> {
override fun create(initialState: CreateDirectRoomViewState): CreateDirectRoomViewModel override fun create(initialState: CreateDirectRoomViewState): CreateDirectRoomViewModel
} }

View file

@ -29,7 +29,6 @@ import im.vector.app.core.extensions.replaceFragment
import im.vector.app.core.platform.SimpleFragmentActivity import im.vector.app.core.platform.SimpleFragmentActivity
import im.vector.app.core.ui.views.KeysBackupBanner import im.vector.app.core.ui.views.KeysBackupBanner
import im.vector.app.features.crypto.quads.SharedSecureStorageActivity import im.vector.app.features.crypto.quads.SharedSecureStorageActivity
import org.matrix.android.sdk.api.session.Session
import org.matrix.android.sdk.api.session.crypto.crosssigning.KEYBACKUP_SECRET_SSSS_NAME import org.matrix.android.sdk.api.session.crypto.crosssigning.KEYBACKUP_SECRET_SSSS_NAME
import javax.inject.Inject import javax.inject.Inject

View file

@ -23,11 +23,9 @@ import com.airbnb.mvrx.viewModel
import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.dialog.MaterialAlertDialogBuilder
import dagger.hilt.android.AndroidEntryPoint import dagger.hilt.android.AndroidEntryPoint
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.extensions.replaceFragment import im.vector.app.core.extensions.replaceFragment
import im.vector.app.core.platform.SimpleFragmentActivity import im.vector.app.core.platform.SimpleFragmentActivity
import im.vector.app.core.platform.WaitingViewData import im.vector.app.core.platform.WaitingViewData
import javax.inject.Inject
@AndroidEntryPoint @AndroidEntryPoint
class KeysBackupManageActivity : SimpleFragmentActivity() { class KeysBackupManageActivity : SimpleFragmentActivity() {

View file

@ -41,7 +41,7 @@ class KeysBackupSettingsViewModel @AssistedInject constructor(@Assisted initialS
KeysBackupStateListener { KeysBackupStateListener {
@AssistedFactory @AssistedFactory
interface Factory: MavericksAssistedViewModelFactory<KeysBackupSettingsViewModel,KeysBackupSettingViewState> { interface Factory : MavericksAssistedViewModelFactory<KeysBackupSettingsViewModel, KeysBackupSettingViewState> {
override fun create(initialState: KeysBackupSettingViewState): KeysBackupSettingsViewModel override fun create(initialState: KeysBackupSettingViewState): KeysBackupSettingsViewModel
} }

View file

@ -26,7 +26,6 @@ import com.google.android.material.dialog.MaterialAlertDialogBuilder
import dagger.hilt.android.AndroidEntryPoint import dagger.hilt.android.AndroidEntryPoint
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.di.ActiveSessionHolder import im.vector.app.core.di.ActiveSessionHolder
import im.vector.app.core.dialogs.ExportKeysDialog import im.vector.app.core.dialogs.ExportKeysDialog
import im.vector.app.core.extensions.observeEvent import im.vector.app.core.extensions.observeEvent
import im.vector.app.core.extensions.queryExportKeys import im.vector.app.core.extensions.queryExportKeys

View file

@ -30,7 +30,6 @@ import com.airbnb.mvrx.viewModel
import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.dialog.MaterialAlertDialogBuilder
import dagger.hilt.android.AndroidEntryPoint import dagger.hilt.android.AndroidEntryPoint
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.error.ErrorFormatter import im.vector.app.core.error.ErrorFormatter
import im.vector.app.core.extensions.commitTransaction import im.vector.app.core.extensions.commitTransaction
import im.vector.app.core.platform.SimpleFragmentActivity import im.vector.app.core.platform.SimpleFragmentActivity

View file

@ -19,12 +19,10 @@ package im.vector.app.features.crypto.quads
import com.airbnb.mvrx.Async import com.airbnb.mvrx.Async
import com.airbnb.mvrx.Fail import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.Mavericks
import com.airbnb.mvrx.MavericksState import com.airbnb.mvrx.MavericksState
import com.airbnb.mvrx.MavericksViewModelFactory 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 dagger.assisted.Assisted import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory import dagger.assisted.AssistedFactory
import dagger.assisted.AssistedInject import dagger.assisted.AssistedInject
@ -62,7 +60,7 @@ data class SharedSecureStorageViewState(
val resultKeyStoreAlias: String val resultKeyStoreAlias: String
) : MavericksState { ) : MavericksState {
constructor(args: SharedSecureStorageActivity.Args): this( constructor(args: SharedSecureStorageActivity.Args) : this(
keyId = args.keyId, keyId = args.keyId,
requestedSecrets = args.requestedSecrets, requestedSecrets = args.requestedSecrets,
resultKeyStoreAlias = args.resultKeyStoreAlias resultKeyStoreAlias = args.resultKeyStoreAlias
@ -82,7 +80,7 @@ class SharedSecureStorageViewModel @AssistedInject constructor(
VectorViewModel<SharedSecureStorageViewState, SharedSecureStorageAction, SharedSecureStorageViewEvent>(initialState) { VectorViewModel<SharedSecureStorageViewState, SharedSecureStorageAction, SharedSecureStorageViewEvent>(initialState) {
@AssistedFactory @AssistedFactory
interface Factory: MavericksAssistedViewModelFactory<SharedSecureStorageViewModel,SharedSecureStorageViewState> { interface Factory : MavericksAssistedViewModelFactory<SharedSecureStorageViewModel, SharedSecureStorageViewState> {
override fun create(initialState: SharedSecureStorageViewState): SharedSecureStorageViewModel override fun create(initialState: SharedSecureStorageViewState): SharedSecureStorageViewModel
} }
@ -90,8 +88,8 @@ class SharedSecureStorageViewModel @AssistedInject constructor(
setState { setState {
copy(userId = session.myUserId) copy(userId = session.myUserId)
} }
val isValid = session.sharedSecretStorageService.checkShouldBeAbleToAccessSecrets(initialState.requestedSecrets, initialState.keyId) is IntegrityResult.Success val integrityResult = session.sharedSecretStorageService.checkShouldBeAbleToAccessSecrets(initialState.requestedSecrets, initialState.keyId)
if (!isValid) { if (integrityResult !is IntegrityResult.Success) {
_viewEvents.post( _viewEvents.post(
SharedSecureStorageViewEvent.Error( SharedSecureStorageViewEvent.Error(
stringProvider.getString(R.string.enter_secret_storage_invalid), stringProvider.getString(R.string.enter_secret_storage_invalid),

View file

@ -35,7 +35,6 @@ import com.airbnb.mvrx.withState
import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.dialog.MaterialAlertDialogBuilder
import dagger.hilt.android.AndroidEntryPoint import dagger.hilt.android.AndroidEntryPoint
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.extensions.commitTransaction import im.vector.app.core.extensions.commitTransaction
import im.vector.app.core.extensions.exhaustive import im.vector.app.core.extensions.exhaustive
import im.vector.app.core.extensions.registerStartForActivityResult import im.vector.app.core.extensions.registerStartForActivityResult
@ -44,7 +43,6 @@ import im.vector.app.databinding.BottomSheetBootstrapBinding
import im.vector.app.features.auth.ReAuthActivity import im.vector.app.features.auth.ReAuthActivity
import kotlinx.parcelize.Parcelize import kotlinx.parcelize.Parcelize
import org.matrix.android.sdk.api.auth.data.LoginFlowTypes import org.matrix.android.sdk.api.auth.data.LoginFlowTypes
import javax.inject.Inject
import kotlin.reflect.KClass import kotlin.reflect.KClass
@AndroidEntryPoint @AndroidEntryPoint

View file

@ -17,12 +17,10 @@
package im.vector.app.features.crypto.recover package im.vector.app.features.crypto.recover
import com.airbnb.mvrx.Fail import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MavericksViewModelFactory 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.nulabinc.zxcvbn.Zxcvbn import com.nulabinc.zxcvbn.Zxcvbn
import dagger.assisted.Assisted import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory import dagger.assisted.AssistedFactory
@ -36,7 +34,6 @@ import im.vector.app.core.platform.VectorViewModel
import im.vector.app.core.platform.WaitingViewData import im.vector.app.core.platform.WaitingViewData
import im.vector.app.core.resources.StringProvider import im.vector.app.core.resources.StringProvider
import im.vector.app.features.auth.ReAuthActivity import im.vector.app.features.auth.ReAuthActivity
import im.vector.app.features.login.ReAuthHelper
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import org.matrix.android.sdk.api.auth.UIABaseAuth import org.matrix.android.sdk.api.auth.UIABaseAuth

View file

@ -37,6 +37,5 @@ data class BootstrapViewState(
val recoverySaveFileProcess: Async<Unit> = Uninitialized val recoverySaveFileProcess: Async<Unit> = Uninitialized
) : MavericksState { ) : MavericksState {
constructor(args: BootstrapBottomSheet.Args): this(setupMode = args.setUpMode) constructor(args: BootstrapBottomSheet.Args) : this(setupMode = args.setUpMode)
} }

View file

@ -30,7 +30,6 @@ import com.airbnb.mvrx.withState
import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.dialog.MaterialAlertDialogBuilder
import dagger.hilt.android.AndroidEntryPoint import dagger.hilt.android.AndroidEntryPoint
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.extensions.commitTransaction import im.vector.app.core.extensions.commitTransaction
import im.vector.app.core.extensions.exhaustive import im.vector.app.core.extensions.exhaustive
import im.vector.app.core.extensions.registerStartForActivityResult import im.vector.app.core.extensions.registerStartForActivityResult

View file

@ -22,8 +22,8 @@ import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory import dagger.assisted.AssistedFactory
import dagger.assisted.AssistedInject import dagger.assisted.AssistedInject
import dagger.hilt.EntryPoints import dagger.hilt.EntryPoints
import im.vector.app.core.di.SingletonEntryPoint
import im.vector.app.core.di.MavericksAssistedViewModelFactory import im.vector.app.core.di.MavericksAssistedViewModelFactory
import im.vector.app.core.di.SingletonEntryPoint
import im.vector.app.core.di.hiltMavericksViewModelFactory import im.vector.app.core.di.hiltMavericksViewModelFactory
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

View file

@ -27,8 +27,8 @@ import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory import dagger.assisted.AssistedFactory
import dagger.assisted.AssistedInject import dagger.assisted.AssistedInject
import dagger.hilt.EntryPoints import dagger.hilt.EntryPoints
import im.vector.app.core.di.SingletonEntryPoint
import im.vector.app.core.di.MavericksAssistedViewModelFactory import im.vector.app.core.di.MavericksAssistedViewModelFactory
import im.vector.app.core.di.SingletonEntryPoint
import im.vector.app.core.di.hiltMavericksViewModelFactory import im.vector.app.core.di.hiltMavericksViewModelFactory
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
@ -153,7 +153,7 @@ class VerificationEmojiCodeViewModel @AssistedInject constructor(
} }
@AssistedFactory @AssistedFactory
interface Factory: MavericksAssistedViewModelFactory<VerificationEmojiCodeViewModel,VerificationEmojiCodeViewState> { interface Factory : MavericksAssistedViewModelFactory<VerificationEmojiCodeViewModel, VerificationEmojiCodeViewState> {
override fun create(initialState: VerificationEmojiCodeViewState): VerificationEmojiCodeViewModel override fun create(initialState: VerificationEmojiCodeViewState): VerificationEmojiCodeViewModel
} }

View file

@ -22,8 +22,8 @@ import dagger.assisted.AssistedFactory
import dagger.assisted.AssistedInject import dagger.assisted.AssistedInject
import dagger.hilt.EntryPoints import dagger.hilt.EntryPoints
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.di.SingletonEntryPoint
import im.vector.app.core.di.MavericksAssistedViewModelFactory import im.vector.app.core.di.MavericksAssistedViewModelFactory
import im.vector.app.core.di.SingletonEntryPoint
import im.vector.app.core.di.hiltMavericksViewModelFactory import im.vector.app.core.di.hiltMavericksViewModelFactory
import im.vector.app.core.extensions.exhaustive import im.vector.app.core.extensions.exhaustive
import im.vector.app.core.platform.VectorViewModel import im.vector.app.core.platform.VectorViewModel
@ -43,7 +43,7 @@ class SetIdentityServerViewModel @AssistedInject constructor(
VectorViewModel<SetIdentityServerState, SetIdentityServerAction, SetIdentityServerViewEvents>(initialState) { VectorViewModel<SetIdentityServerState, SetIdentityServerAction, SetIdentityServerViewEvents>(initialState) {
@AssistedFactory @AssistedFactory
interface Factory: MavericksAssistedViewModelFactory<SetIdentityServerViewModel,SetIdentityServerState> { interface Factory : MavericksAssistedViewModelFactory<SetIdentityServerViewModel, SetIdentityServerState> {
override fun create(initialState: SetIdentityServerState): SetIdentityServerViewModel override fun create(initialState: SetIdentityServerState): SetIdentityServerViewModel
} }
@ -56,7 +56,6 @@ class SetIdentityServerViewModel @AssistedInject constructor(
defaultIdentityServerUrl = session.identityService().getDefaultIdentityServer() defaultIdentityServerUrl = session.identityService().getDefaultIdentityServer()
) )
} }
} }
var currentWantedUrl: String? = null var currentWantedUrl: String? = null

View file

@ -38,7 +38,6 @@ import dagger.hilt.android.AndroidEntryPoint
import im.vector.app.AppStateHandler import im.vector.app.AppStateHandler
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.di.ActiveSessionHolder import im.vector.app.core.di.ActiveSessionHolder
import im.vector.app.core.extensions.exhaustive import im.vector.app.core.extensions.exhaustive
import im.vector.app.core.extensions.hideKeyboard import im.vector.app.core.extensions.hideKeyboard
import im.vector.app.core.extensions.registerStartForActivityResult import im.vector.app.core.extensions.registerStartForActivityResult
@ -73,7 +72,6 @@ import im.vector.app.features.spaces.invite.SpaceInviteBottomSheet
import im.vector.app.features.spaces.share.ShareSpaceBottomSheet import im.vector.app.features.spaces.share.ShareSpaceBottomSheet
import im.vector.app.features.themes.ThemeUtils import im.vector.app.features.themes.ThemeUtils
import im.vector.app.features.workers.signout.ServerBackupStatusViewModel import im.vector.app.features.workers.signout.ServerBackupStatusViewModel
import im.vector.app.features.workers.signout.ServerBackupStatusViewState
import im.vector.app.push.fcm.FcmHelper import im.vector.app.push.fcm.FcmHelper
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import kotlinx.parcelize.Parcelize import kotlinx.parcelize.Parcelize

View file

@ -57,7 +57,6 @@ import im.vector.app.features.settings.VectorSettingsActivity.Companion.EXTRA_DI
import im.vector.app.features.themes.ThemeUtils import im.vector.app.features.themes.ThemeUtils
import im.vector.app.features.workers.signout.BannerState import im.vector.app.features.workers.signout.BannerState
import im.vector.app.features.workers.signout.ServerBackupStatusViewModel import im.vector.app.features.workers.signout.ServerBackupStatusViewModel
import im.vector.app.features.workers.signout.ServerBackupStatusViewState
import org.matrix.android.sdk.api.session.group.model.GroupSummary import org.matrix.android.sdk.api.session.group.model.GroupSummary
import org.matrix.android.sdk.api.session.room.model.RoomSummary import org.matrix.android.sdk.api.session.room.model.RoomSummary
import org.matrix.android.sdk.internal.crypto.model.rest.DeviceInfo import org.matrix.android.sdk.internal.crypto.model.rest.DeviceInfo
@ -500,5 +499,4 @@ class HomeDetailFragment @Inject constructor(
} }
return this return this
} }
} }

View file

@ -22,10 +22,8 @@ import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory import dagger.assisted.AssistedFactory
import dagger.assisted.AssistedInject import dagger.assisted.AssistedInject
import dagger.hilt.EntryPoints
import im.vector.app.AppStateHandler import im.vector.app.AppStateHandler
import im.vector.app.RoomGroupingMethod import im.vector.app.RoomGroupingMethod
import im.vector.app.core.di.SingletonEntryPoint
import im.vector.app.core.di.MavericksAssistedViewModelFactory import im.vector.app.core.di.MavericksAssistedViewModelFactory
import im.vector.app.core.di.hiltMavericksViewModelFactory import im.vector.app.core.di.hiltMavericksViewModelFactory
import im.vector.app.core.extensions.singletonEntryPoint import im.vector.app.core.extensions.singletonEntryPoint
@ -72,11 +70,11 @@ class HomeDetailViewModel @AssistedInject constructor(@Assisted initialState: Ho
CallProtocolsChecker.Listener { CallProtocolsChecker.Listener {
@AssistedFactory @AssistedFactory
interface Factory: MavericksAssistedViewModelFactory<HomeDetailViewModel,HomeDetailViewState> { interface Factory : MavericksAssistedViewModelFactory<HomeDetailViewModel, HomeDetailViewState> {
override fun create(initialState: HomeDetailViewState): HomeDetailViewModel override fun create(initialState: HomeDetailViewState): HomeDetailViewModel
} }
companion object : MavericksViewModelFactory<HomeDetailViewModel, HomeDetailViewState> by hiltMavericksViewModelFactory(){ companion object : MavericksViewModelFactory<HomeDetailViewModel, HomeDetailViewState> by hiltMavericksViewModelFactory() {
override fun initialState(viewModelContext: ViewModelContext): HomeDetailViewState { override fun initialState(viewModelContext: ViewModelContext): HomeDetailViewState {
val uiStateRepository = viewModelContext.activity.singletonEntryPoint().uiStateRepository() val uiStateRepository = viewModelContext.activity.singletonEntryPoint().uiStateRepository()

View file

@ -16,11 +16,8 @@
package im.vector.app.features.home 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.MavericksState
import com.airbnb.mvrx.MavericksViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory import dagger.assisted.AssistedFactory
import dagger.assisted.AssistedInject import dagger.assisted.AssistedInject
@ -74,7 +71,7 @@ class PromoteRestrictedViewModel @AssistedInject constructor(
} }
@AssistedFactory @AssistedFactory
interface Factory: MavericksAssistedViewModelFactory<PromoteRestrictedViewModel,ActiveSpaceViewState> { interface Factory : MavericksAssistedViewModelFactory<PromoteRestrictedViewModel, ActiveSpaceViewState> {
override fun create(initialState: ActiveSpaceViewState): PromoteRestrictedViewModel override fun create(initialState: ActiveSpaceViewState): PromoteRestrictedViewModel
} }

View file

@ -65,7 +65,7 @@ class UnknownDeviceDetectorSharedViewModel @AssistedInject constructor(@Assisted
} }
@AssistedFactory @AssistedFactory
interface Factory: MavericksAssistedViewModelFactory<UnknownDeviceDetectorSharedViewModel,UnknownDevicesState> { interface Factory : MavericksAssistedViewModelFactory<UnknownDeviceDetectorSharedViewModel, UnknownDevicesState> {
override fun create(initialState: UnknownDevicesState): UnknownDeviceDetectorSharedViewModel override fun create(initialState: UnknownDevicesState): UnknownDeviceDetectorSharedViewModel
} }

View file

@ -60,7 +60,7 @@ class UnreadMessagesSharedViewModel @AssistedInject constructor(@Assisted initia
VectorViewModel<UnreadMessagesState, EmptyAction, EmptyViewEvents>(initialState) { VectorViewModel<UnreadMessagesState, EmptyAction, EmptyViewEvents>(initialState) {
@AssistedFactory @AssistedFactory
interface Factory: MavericksAssistedViewModelFactory<UnreadMessagesSharedViewModel,UnreadMessagesState> { interface Factory : MavericksAssistedViewModelFactory<UnreadMessagesSharedViewModel, UnreadMessagesState> {
override fun create(initialState: UnreadMessagesState): UnreadMessagesSharedViewModel override fun create(initialState: UnreadMessagesState): UnreadMessagesSharedViewModel
} }

View file

@ -16,9 +16,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.MavericksViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory import dagger.assisted.AssistedFactory
import dagger.assisted.AssistedInject import dagger.assisted.AssistedInject

View file

@ -27,7 +27,6 @@ import com.airbnb.mvrx.Uninitialized
import com.airbnb.mvrx.parentFragmentViewModel import com.airbnb.mvrx.parentFragmentViewModel
import dagger.hilt.android.AndroidEntryPoint import dagger.hilt.android.AndroidEntryPoint
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.epoxy.ClickListener import im.vector.app.core.epoxy.ClickListener
import im.vector.app.core.error.ErrorFormatter import im.vector.app.core.error.ErrorFormatter
import im.vector.app.core.platform.ButtonStateView import im.vector.app.core.platform.ButtonStateView

View file

@ -29,7 +29,6 @@ import com.airbnb.mvrx.viewModel
import com.google.android.material.appbar.MaterialToolbar import com.google.android.material.appbar.MaterialToolbar
import dagger.hilt.android.AndroidEntryPoint import dagger.hilt.android.AndroidEntryPoint
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.extensions.hideKeyboard import im.vector.app.core.extensions.hideKeyboard
import im.vector.app.core.extensions.replaceFragment import im.vector.app.core.extensions.replaceFragment
import im.vector.app.core.platform.ToolbarConfigurable import im.vector.app.core.platform.ToolbarConfigurable

View file

@ -16,9 +16,7 @@
package im.vector.app.features.home.room.detail.composer package im.vector.app.features.home.room.detail.composer
import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.MavericksViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory import dagger.assisted.AssistedFactory
import dagger.assisted.AssistedInject import dagger.assisted.AssistedInject
@ -31,7 +29,6 @@ import im.vector.app.core.resources.StringProvider
import im.vector.app.features.command.CommandParser import im.vector.app.features.command.CommandParser
import im.vector.app.features.command.ParsedCommand import im.vector.app.features.command.ParsedCommand
import im.vector.app.features.home.room.detail.ChatEffect import im.vector.app.features.home.room.detail.ChatEffect
import im.vector.app.features.home.room.detail.RoomDetailFragment
import im.vector.app.features.home.room.detail.composer.rainbow.RainbowGenerator import im.vector.app.features.home.room.detail.composer.rainbow.RainbowGenerator
import im.vector.app.features.home.room.detail.toMessageType import im.vector.app.features.home.room.detail.toMessageType
import im.vector.app.features.powerlevel.PowerLevelsFlowFactory import im.vector.app.features.powerlevel.PowerLevelsFlowFactory
@ -712,7 +709,7 @@ class TextComposerViewModel @AssistedInject constructor(
} }
@AssistedFactory @AssistedFactory
interface Factory: MavericksAssistedViewModelFactory<TextComposerViewModel,TextComposerViewState> { interface Factory : MavericksAssistedViewModelFactory<TextComposerViewModel, TextComposerViewState> {
override fun create(initialState: TextComposerViewState): TextComposerViewModel override fun create(initialState: TextComposerViewState): TextComposerViewModel
} }

View file

@ -23,7 +23,6 @@ import androidx.appcompat.widget.SearchView
import com.airbnb.mvrx.Mavericks import com.airbnb.mvrx.Mavericks
import dagger.hilt.android.AndroidEntryPoint import dagger.hilt.android.AndroidEntryPoint
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.extensions.addFragment import im.vector.app.core.extensions.addFragment
import im.vector.app.core.platform.VectorBaseActivity import im.vector.app.core.platform.VectorBaseActivity
import im.vector.app.databinding.ActivitySearchBinding import im.vector.app.databinding.ActivitySearchBinding

View file

@ -45,7 +45,7 @@ class SearchViewModel @AssistedInject constructor(
private var nextBatch: String? = null private var nextBatch: String? = null
@AssistedFactory @AssistedFactory
interface Factory: MavericksAssistedViewModelFactory<SearchViewModel,SearchViewState> { interface Factory : MavericksAssistedViewModelFactory<SearchViewModel, SearchViewState> {
override fun create(initialState: SearchViewState): SearchViewModel override fun create(initialState: SearchViewState): SearchViewModel
} }

View file

@ -85,7 +85,7 @@ class MessageActionsViewModel @AssistedInject constructor(@Assisted
private val eventIdFlow = MutableStateFlow(initialState.eventId) private val eventIdFlow = MutableStateFlow(initialState.eventId)
@AssistedFactory @AssistedFactory
interface Factory: MavericksAssistedViewModelFactory<MessageActionsViewModel,MessageActionState> { interface Factory : MavericksAssistedViewModelFactory<MessageActionsViewModel, MessageActionState> {
override fun create(initialState: MessageActionState): MessageActionsViewModel override fun create(initialState: MessageActionState): MessageActionsViewModel
} }

View file

@ -46,7 +46,7 @@ class ViewEditHistoryViewModel @AssistedInject constructor(
?: throw IllegalStateException("Shouldn't use this ViewModel without a room") ?: throw IllegalStateException("Shouldn't use this ViewModel without a room")
@AssistedFactory @AssistedFactory
interface Factory: MavericksAssistedViewModelFactory<ViewEditHistoryViewModel,ViewEditHistoryViewState> { interface Factory : MavericksAssistedViewModelFactory<ViewEditHistoryViewModel, ViewEditHistoryViewState> {
override fun create(initialState: ViewEditHistoryViewState): ViewEditHistoryViewModel override fun create(initialState: ViewEditHistoryViewState): ViewEditHistoryViewModel
} }

View file

@ -17,11 +17,9 @@
package im.vector.app.features.home.room.detail.timeline.reactions 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.MavericksState import com.airbnb.mvrx.MavericksState
import com.airbnb.mvrx.MavericksViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Uninitialized import com.airbnb.mvrx.Uninitialized
import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory import dagger.assisted.AssistedFactory
import dagger.assisted.AssistedInject import dagger.assisted.AssistedInject
@ -72,7 +70,7 @@ class ViewReactionsViewModel @AssistedInject constructor(@Assisted
?: throw IllegalStateException("Shouldn't use this ViewModel without a room") ?: throw IllegalStateException("Shouldn't use this ViewModel without a room")
@AssistedFactory @AssistedFactory
interface Factory: MavericksAssistedViewModelFactory<ViewReactionsViewModel,DisplayReactionsViewState> { interface Factory : MavericksAssistedViewModelFactory<ViewReactionsViewModel, DisplayReactionsViewState> {
override fun create(initialState: DisplayReactionsViewState): ViewReactionsViewModel override fun create(initialState: DisplayReactionsViewState): ViewReactionsViewModel
} }

View file

@ -29,7 +29,6 @@ import com.airbnb.mvrx.fragmentViewModel
import com.airbnb.mvrx.withState import com.airbnb.mvrx.withState
import dagger.hilt.android.AndroidEntryPoint import dagger.hilt.android.AndroidEntryPoint
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.error.ErrorFormatter import im.vector.app.core.error.ErrorFormatter
import im.vector.app.core.extensions.setTextOrHide import im.vector.app.core.extensions.setTextOrHide
import im.vector.app.core.platform.VectorBaseBottomSheetDialogFragment import im.vector.app.core.platform.VectorBaseBottomSheetDialogFragment
@ -39,7 +38,7 @@ import javax.inject.Inject
@AndroidEntryPoint @AndroidEntryPoint
class MigrateRoomBottomSheet : class MigrateRoomBottomSheet :
VectorBaseBottomSheetDialogFragment<BottomSheetRoomUpgradeBinding>(){ VectorBaseBottomSheetDialogFragment<BottomSheetRoomUpgradeBinding>() {
enum class MigrationReason { enum class MigrationReason {
MANUAL, MANUAL,

View file

@ -50,7 +50,7 @@ class MigrateRoomViewModel @AssistedInject constructor(
} }
@AssistedFactory @AssistedFactory
interface Factory: MavericksAssistedViewModelFactory<MigrateRoomViewModel,MigrateRoomViewState> { interface Factory : MavericksAssistedViewModelFactory<MigrateRoomViewModel, MigrateRoomViewState> {
override fun create(initialState: MigrateRoomViewState): MigrateRoomViewModel override fun create(initialState: MigrateRoomViewState): MigrateRoomViewModel
} }

View file

@ -24,7 +24,6 @@ import com.airbnb.mvrx.parentFragmentViewModel
import com.airbnb.mvrx.withState import com.airbnb.mvrx.withState
import dagger.hilt.android.AndroidEntryPoint import dagger.hilt.android.AndroidEntryPoint
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.extensions.cleanup import im.vector.app.core.extensions.cleanup
import im.vector.app.core.extensions.configureWith import im.vector.app.core.extensions.configureWith
import im.vector.app.core.platform.VectorBaseBottomSheetDialogFragment import im.vector.app.core.platform.VectorBaseBottomSheetDialogFragment

View file

@ -22,7 +22,6 @@ import android.os.Bundle
import androidx.appcompat.widget.SearchView import androidx.appcompat.widget.SearchView
import dagger.hilt.android.AndroidEntryPoint import dagger.hilt.android.AndroidEntryPoint
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.extensions.replaceFragment import im.vector.app.core.extensions.replaceFragment
import im.vector.app.core.platform.VectorBaseActivity import im.vector.app.core.platform.VectorBaseActivity
import im.vector.app.databinding.ActivityFilteredRoomsBinding import im.vector.app.databinding.ActivityFilteredRoomsBinding

View file

@ -19,11 +19,9 @@ package im.vector.app.features.home.room.list
import androidx.lifecycle.MutableLiveData import androidx.lifecycle.MutableLiveData
import com.airbnb.mvrx.Async import com.airbnb.mvrx.Async
import com.airbnb.mvrx.Fail import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MavericksViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory import dagger.assisted.AssistedFactory
import dagger.assisted.AssistedInject import dagger.assisted.AssistedInject
@ -51,7 +49,6 @@ import org.matrix.android.sdk.api.session.room.state.isPublic
import org.matrix.android.sdk.api.util.toMatrixItem import org.matrix.android.sdk.api.util.toMatrixItem
import org.matrix.android.sdk.flow.flow import org.matrix.android.sdk.flow.flow
import timber.log.Timber import timber.log.Timber
import javax.inject.Inject
class RoomListViewModel @AssistedInject constructor( class RoomListViewModel @AssistedInject constructor(
@Assisted initialState: RoomListViewState, @Assisted initialState: RoomListViewState,
@ -63,7 +60,7 @@ class RoomListViewModel @AssistedInject constructor(
) : VectorViewModel<RoomListViewState, RoomListAction, RoomListViewEvents>(initialState) { ) : VectorViewModel<RoomListViewState, RoomListAction, RoomListViewEvents>(initialState) {
@AssistedFactory @AssistedFactory
interface Factory: MavericksAssistedViewModelFactory<RoomListViewModel, RoomListViewState> { interface Factory : MavericksAssistedViewModelFactory<RoomListViewModel, RoomListViewState> {
override fun create(initialState: RoomListViewState): RoomListViewModel override fun create(initialState: RoomListViewState): RoomListViewModel
} }

View file

@ -22,8 +22,8 @@ import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory import dagger.assisted.AssistedFactory
import dagger.assisted.AssistedInject import dagger.assisted.AssistedInject
import dagger.hilt.EntryPoints import dagger.hilt.EntryPoints
import im.vector.app.core.di.SingletonEntryPoint
import im.vector.app.core.di.MavericksAssistedViewModelFactory import im.vector.app.core.di.MavericksAssistedViewModelFactory
import im.vector.app.core.di.SingletonEntryPoint
import im.vector.app.core.di.hiltMavericksViewModelFactory import im.vector.app.core.di.hiltMavericksViewModelFactory
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
@ -44,7 +44,7 @@ class HomeServerCapabilitiesViewModel @AssistedInject constructor(
) : VectorViewModel<HomeServerCapabilitiesViewState, EmptyAction, EmptyViewEvents>(initialState) { ) : VectorViewModel<HomeServerCapabilitiesViewState, EmptyAction, EmptyViewEvents>(initialState) {
@AssistedFactory @AssistedFactory
interface Factory: MavericksAssistedViewModelFactory<HomeServerCapabilitiesViewModel,HomeServerCapabilitiesViewState> { interface Factory : MavericksAssistedViewModelFactory<HomeServerCapabilitiesViewModel, HomeServerCapabilitiesViewState> {
override fun create(initialState: HomeServerCapabilitiesViewState): HomeServerCapabilitiesViewModel override fun create(initialState: HomeServerCapabilitiesViewState): HomeServerCapabilitiesViewModel
} }

View file

@ -26,7 +26,6 @@ import com.airbnb.mvrx.viewModel
import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.dialog.MaterialAlertDialogBuilder
import dagger.hilt.android.AndroidEntryPoint import dagger.hilt.android.AndroidEntryPoint
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.error.ErrorFormatter import im.vector.app.core.error.ErrorFormatter
import im.vector.app.core.extensions.addFragment import im.vector.app.core.extensions.addFragment
import im.vector.app.core.extensions.addFragmentToBackstack import im.vector.app.core.extensions.addFragmentToBackstack
@ -38,14 +37,10 @@ import im.vector.app.core.utils.onPermissionDeniedSnackbar
import im.vector.app.core.utils.registerForPermissionsResult import im.vector.app.core.utils.registerForPermissionsResult
import im.vector.app.core.utils.toast import im.vector.app.core.utils.toast
import im.vector.app.features.contactsbook.ContactsBookFragment import im.vector.app.features.contactsbook.ContactsBookFragment
import im.vector.app.features.contactsbook.ContactsBookViewModel
import im.vector.app.features.contactsbook.ContactsBookViewState
import im.vector.app.features.userdirectory.UserListFragment import im.vector.app.features.userdirectory.UserListFragment
import im.vector.app.features.userdirectory.UserListFragmentArgs import im.vector.app.features.userdirectory.UserListFragmentArgs
import im.vector.app.features.userdirectory.UserListSharedAction import im.vector.app.features.userdirectory.UserListSharedAction
import im.vector.app.features.userdirectory.UserListSharedActionViewModel import im.vector.app.features.userdirectory.UserListSharedActionViewModel
import im.vector.app.features.userdirectory.UserListViewModel
import im.vector.app.features.userdirectory.UserListViewState
import kotlinx.parcelize.Parcelize import kotlinx.parcelize.Parcelize
import org.matrix.android.sdk.api.failure.Failure import org.matrix.android.sdk.api.failure.Failure
import java.net.HttpURLConnection import java.net.HttpURLConnection

View file

@ -42,7 +42,7 @@ class InviteUsersToRoomViewModel @AssistedInject constructor(@Assisted
private val room = session.getRoom(initialState.roomId)!! private val room = session.getRoom(initialState.roomId)!!
@AssistedFactory @AssistedFactory
interface Factory: MavericksAssistedViewModelFactory<InviteUsersToRoomViewModel,InviteUsersToRoomViewState> { interface Factory : MavericksAssistedViewModelFactory<InviteUsersToRoomViewModel, InviteUsersToRoomViewState> {
override fun create(initialState: InviteUsersToRoomViewState): InviteUsersToRoomViewModel override fun create(initialState: InviteUsersToRoomViewState): InviteUsersToRoomViewModel
} }

View file

@ -23,7 +23,6 @@ import com.google.android.material.dialog.MaterialAlertDialogBuilder
import dagger.hilt.android.AndroidEntryPoint import dagger.hilt.android.AndroidEntryPoint
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.di.ActiveSessionHolder import im.vector.app.core.di.ActiveSessionHolder
import im.vector.app.core.error.ErrorFormatter import im.vector.app.core.error.ErrorFormatter
import im.vector.app.core.platform.VectorBaseActivity import im.vector.app.core.platform.VectorBaseActivity
import im.vector.app.core.utils.toast import im.vector.app.core.utils.toast

View file

@ -20,7 +20,6 @@ import android.content.Context
import android.content.Intent import android.content.Intent
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import androidx.annotation.CallSuper
import androidx.core.view.ViewCompat import androidx.core.view.ViewCompat
import androidx.core.view.children import androidx.core.view.children
import androidx.core.view.isVisible import androidx.core.view.isVisible
@ -33,7 +32,6 @@ import com.google.android.material.appbar.MaterialToolbar
import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.dialog.MaterialAlertDialogBuilder
import dagger.hilt.android.AndroidEntryPoint import dagger.hilt.android.AndroidEntryPoint
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.extensions.POP_BACK_STACK_EXCLUSIVE import im.vector.app.core.extensions.POP_BACK_STACK_EXCLUSIVE
import im.vector.app.core.extensions.addFragment import im.vector.app.core.extensions.addFragment
import im.vector.app.core.extensions.addFragmentToBackstack import im.vector.app.core.extensions.addFragmentToBackstack
@ -49,7 +47,6 @@ import im.vector.app.features.pin.UnlockedActivity
import org.matrix.android.sdk.api.auth.registration.FlowResult import org.matrix.android.sdk.api.auth.registration.FlowResult
import org.matrix.android.sdk.api.auth.registration.Stage import org.matrix.android.sdk.api.auth.registration.Stage
import org.matrix.android.sdk.api.extensions.tryOrNull import org.matrix.android.sdk.api.extensions.tryOrNull
import javax.inject.Inject
/** /**
* The LoginActivity manages the fragment navigation and also display the loading View * The LoginActivity manages the fragment navigation and also display the loading View

View file

@ -18,15 +18,12 @@ package im.vector.app.features.login
import android.content.Context import android.content.Context
import android.net.Uri import android.net.Uri
import androidx.fragment.app.FragmentActivity
import androidx.lifecycle.viewModelScope import androidx.lifecycle.viewModelScope
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.MavericksViewModelFactory 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 dagger.assisted.Assisted import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory import dagger.assisted.AssistedFactory
import dagger.assisted.AssistedInject import dagger.assisted.AssistedInject
@ -39,7 +36,6 @@ import im.vector.app.core.extensions.exhaustive
import im.vector.app.core.platform.VectorViewModel import im.vector.app.core.platform.VectorViewModel
import im.vector.app.core.resources.StringProvider import im.vector.app.core.resources.StringProvider
import im.vector.app.core.utils.ensureTrailingSlash import im.vector.app.core.utils.ensureTrailingSlash
import im.vector.app.features.signout.soft.SoftLogoutActivity
import kotlinx.coroutines.Job import kotlinx.coroutines.Job
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import org.matrix.android.sdk.api.MatrixPatterns.getDomain import org.matrix.android.sdk.api.MatrixPatterns.getDomain
@ -74,7 +70,7 @@ class LoginViewModel @AssistedInject constructor(
) : VectorViewModel<LoginViewState, LoginAction, LoginViewEvents>(initialState) { ) : VectorViewModel<LoginViewState, LoginAction, LoginViewEvents>(initialState) {
@AssistedFactory @AssistedFactory
interface Factory:MavericksAssistedViewModelFactory<LoginViewModel,LoginViewState> { interface Factory : MavericksAssistedViewModelFactory<LoginViewModel, LoginViewState> {
override fun create(initialState: LoginViewState): LoginViewModel override fun create(initialState: LoginViewState): LoginViewModel
} }

View file

@ -20,7 +20,6 @@ import android.content.Context
import android.content.Intent import android.content.Intent
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import androidx.annotation.CallSuper
import androidx.core.view.ViewCompat import androidx.core.view.ViewCompat
import androidx.core.view.children import androidx.core.view.children
import androidx.core.view.isVisible import androidx.core.view.isVisible
@ -32,7 +31,6 @@ import com.google.android.material.appbar.MaterialToolbar
import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.dialog.MaterialAlertDialogBuilder
import dagger.hilt.android.AndroidEntryPoint import dagger.hilt.android.AndroidEntryPoint
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.extensions.POP_BACK_STACK_EXCLUSIVE import im.vector.app.core.extensions.POP_BACK_STACK_EXCLUSIVE
import im.vector.app.core.extensions.addFragment import im.vector.app.core.extensions.addFragment
import im.vector.app.core.extensions.addFragmentToBackstack import im.vector.app.core.extensions.addFragmentToBackstack
@ -56,7 +54,6 @@ import im.vector.app.features.pin.UnlockedActivity
import org.matrix.android.sdk.api.auth.registration.FlowResult import org.matrix.android.sdk.api.auth.registration.FlowResult
import org.matrix.android.sdk.api.auth.registration.Stage import org.matrix.android.sdk.api.auth.registration.Stage
import org.matrix.android.sdk.api.extensions.tryOrNull import org.matrix.android.sdk.api.extensions.tryOrNull
import javax.inject.Inject
/** /**
* The LoginActivity manages the fragment navigation and also display the loading View * The LoginActivity manages the fragment navigation and also display the loading View

View file

@ -18,12 +18,9 @@ package im.vector.app.features.login2
import android.content.Context import android.content.Context
import android.net.Uri import android.net.Uri
import androidx.fragment.app.FragmentActivity
import androidx.lifecycle.viewModelScope import androidx.lifecycle.viewModelScope
import com.airbnb.mvrx.ActivityViewModelContext
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MavericksViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory import dagger.assisted.AssistedFactory
import dagger.assisted.AssistedInject import dagger.assisted.AssistedInject
@ -74,7 +71,7 @@ class LoginViewModel2 @AssistedInject constructor(
) : VectorViewModel<LoginViewState2, LoginAction2, LoginViewEvents2>(initialState) { ) : VectorViewModel<LoginViewState2, LoginAction2, LoginViewEvents2>(initialState) {
@AssistedFactory @AssistedFactory
interface Factory: MavericksAssistedViewModelFactory<LoginViewModel2,LoginViewState2> { interface Factory : MavericksAssistedViewModelFactory<LoginViewModel2, LoginViewState2> {
override fun create(initialState: LoginViewState2): LoginViewModel2 override fun create(initialState: LoginViewState2): LoginViewModel2
} }

View file

@ -39,7 +39,7 @@ class AccountCreatedViewModel @AssistedInject constructor(
) : VectorViewModel<AccountCreatedViewState, AccountCreatedAction, AccountCreatedViewEvents>(initialState) { ) : VectorViewModel<AccountCreatedViewState, AccountCreatedAction, AccountCreatedViewEvents>(initialState) {
@AssistedFactory @AssistedFactory
interface Factory: MavericksAssistedViewModelFactory<AccountCreatedViewModel,AccountCreatedViewState> { interface Factory : MavericksAssistedViewModelFactory<AccountCreatedViewModel, AccountCreatedViewState> {
override fun create(initialState: AccountCreatedViewState): AccountCreatedViewModel override fun create(initialState: AccountCreatedViewState): AccountCreatedViewModel
} }

View file

@ -30,7 +30,6 @@ import com.airbnb.mvrx.withState
import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.dialog.MaterialAlertDialogBuilder
import dagger.hilt.android.AndroidEntryPoint import dagger.hilt.android.AndroidEntryPoint
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.extensions.commitTransaction import im.vector.app.core.extensions.commitTransaction
import im.vector.app.core.platform.VectorBaseBottomSheetDialogFragment import im.vector.app.core.platform.VectorBaseBottomSheetDialogFragment
import im.vector.app.databinding.BottomSheetMatrixToCardBinding import im.vector.app.databinding.BottomSheetMatrixToCardBinding

View file

@ -53,7 +53,7 @@ class MatrixToBottomSheetViewModel @AssistedInject constructor(
VectorViewModel<MatrixToBottomSheetState, MatrixToAction, MatrixToViewEvents>(initialState) { VectorViewModel<MatrixToBottomSheetState, MatrixToAction, MatrixToViewEvents>(initialState) {
@AssistedFactory @AssistedFactory
interface Factory: MavericksAssistedViewModelFactory<MatrixToBottomSheetViewModel,MatrixToBottomSheetState> { interface Factory : MavericksAssistedViewModelFactory<MatrixToBottomSheetViewModel, MatrixToBottomSheetState> {
override fun create(initialState: MatrixToBottomSheetState): MatrixToBottomSheetViewModel override fun create(initialState: MatrixToBottomSheetState): MatrixToBottomSheetViewModel
} }

View file

@ -22,7 +22,6 @@ import android.os.Bundle
import androidx.core.net.toUri import androidx.core.net.toUri
import dagger.hilt.android.AndroidEntryPoint import dagger.hilt.android.AndroidEntryPoint
import im.vector.app.core.di.ActiveSessionHolder import im.vector.app.core.di.ActiveSessionHolder
import im.vector.app.core.platform.VectorBaseActivity import im.vector.app.core.platform.VectorBaseActivity
import im.vector.app.databinding.ActivityBigImageViewerBinding import im.vector.app.databinding.ActivityBigImageViewerBinding
import javax.inject.Inject import javax.inject.Inject

View file

@ -63,7 +63,6 @@ class VectorAttachmentViewerActivity : AttachmentViewerActivity(), BaseAttachmen
@Inject @Inject
lateinit var imageContentRenderer: ImageContentRenderer lateinit var imageContentRenderer: ImageContentRenderer
private var initialIndex = 0 private var initialIndex = 0
private var isAnimatingOut = false private var isAnimatingOut = false

View file

@ -25,7 +25,6 @@ import com.google.zxing.Result
import com.google.zxing.ResultMetadataType import com.google.zxing.ResultMetadataType
import dagger.hilt.android.AndroidEntryPoint import dagger.hilt.android.AndroidEntryPoint
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.extensions.replaceFragment import im.vector.app.core.extensions.replaceFragment
import im.vector.app.core.platform.VectorBaseActivity import im.vector.app.core.platform.VectorBaseActivity
import im.vector.app.databinding.ActivitySimpleBinding import im.vector.app.databinding.ActivitySimpleBinding

View file

@ -27,12 +27,10 @@ import com.airbnb.mvrx.viewModel
import com.airbnb.mvrx.withState import com.airbnb.mvrx.withState
import dagger.hilt.android.AndroidEntryPoint import dagger.hilt.android.AndroidEntryPoint
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.platform.VectorBaseActivity import im.vector.app.core.platform.VectorBaseActivity
import im.vector.app.databinding.ActivityBugReportBinding import im.vector.app.databinding.ActivityBugReportBinding
import org.matrix.android.sdk.api.extensions.tryOrNull import org.matrix.android.sdk.api.extensions.tryOrNull
import timber.log.Timber import timber.log.Timber
import javax.inject.Inject
/** /**
* Form to send a bug report * Form to send a bug report

View file

@ -35,7 +35,7 @@ class BugReportViewModel @AssistedInject constructor(
) : VectorViewModel<BugReportState, EmptyAction, EmptyViewEvents>(initialState) { ) : VectorViewModel<BugReportState, EmptyAction, EmptyViewEvents>(initialState) {
@AssistedFactory @AssistedFactory
interface Factory: MavericksAssistedViewModelFactory<BugReportViewModel,BugReportState> { interface Factory : MavericksAssistedViewModelFactory<BugReportViewModel, BugReportState> {
override fun create(initialState: BugReportState): BugReportViewModel override fun create(initialState: BugReportState): BugReportViewModel
} }

View file

@ -19,7 +19,6 @@ package im.vector.app.features.rageshake
import android.content.Context import android.content.Context
import android.hardware.Sensor import android.hardware.Sensor
import android.hardware.SensorManager import android.hardware.SensorManager
import androidx.appcompat.app.AppCompatActivity
import androidx.core.content.getSystemService import androidx.core.content.getSystemService
import androidx.fragment.app.FragmentActivity import androidx.fragment.app.FragmentActivity
import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.dialog.MaterialAlertDialogBuilder

View file

@ -32,7 +32,6 @@ import com.jakewharton.rxbinding3.widget.queryTextChanges
import dagger.hilt.android.AndroidEntryPoint import dagger.hilt.android.AndroidEntryPoint
import im.vector.app.EmojiCompatFontProvider import im.vector.app.EmojiCompatFontProvider
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.extensions.observeEvent import im.vector.app.core.extensions.observeEvent
import im.vector.app.core.platform.VectorBaseActivity import im.vector.app.core.platform.VectorBaseActivity
import im.vector.app.databinding.ActivityEmojiReactionPickerBinding import im.vector.app.databinding.ActivityEmojiReactionPickerBinding

View file

@ -39,7 +39,7 @@ class EmojiSearchResultViewModel @AssistedInject constructor(
VectorViewModel<EmojiSearchResultViewState, EmojiSearchAction, EmptyViewEvents>(initialState) { VectorViewModel<EmojiSearchResultViewState, EmojiSearchAction, EmptyViewEvents>(initialState) {
@AssistedFactory @AssistedFactory
interface Factory: MavericksAssistedViewModelFactory<EmojiSearchResultViewModel,EmojiSearchResultViewState> { interface Factory : MavericksAssistedViewModelFactory<EmojiSearchResultViewModel, EmojiSearchResultViewState> {
override fun create(initialState: EmojiSearchResultViewState): EmojiSearchResultViewModel override fun create(initialState: EmojiSearchResultViewState): EmojiSearchResultViewModel
} }

View file

@ -17,7 +17,6 @@
package im.vector.app.features.room package im.vector.app.features.room
import com.airbnb.mvrx.MavericksViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory import dagger.assisted.AssistedFactory
import dagger.assisted.AssistedInject import dagger.assisted.AssistedInject
@ -55,7 +54,7 @@ class RequireActiveMembershipViewModel @AssistedInject constructor(
VectorViewModel<RequireActiveMembershipViewState, RequireActiveMembershipAction, RequireActiveMembershipViewEvents>(initialState) { VectorViewModel<RequireActiveMembershipViewState, RequireActiveMembershipAction, RequireActiveMembershipViewEvents>(initialState) {
@AssistedFactory @AssistedFactory
interface Factory: MavericksAssistedViewModelFactory<RequireActiveMembershipViewModel,RequireActiveMembershipViewState> { interface Factory : MavericksAssistedViewModelFactory<RequireActiveMembershipViewModel, RequireActiveMembershipViewState> {
override fun create(initialState: RequireActiveMembershipViewState): RequireActiveMembershipViewModel override fun create(initialState: RequireActiveMembershipViewState): RequireActiveMembershipViewModel
} }

View file

@ -23,7 +23,6 @@ import com.airbnb.mvrx.viewModel
import com.airbnb.mvrx.withState import com.airbnb.mvrx.withState
import dagger.hilt.android.AndroidEntryPoint import dagger.hilt.android.AndroidEntryPoint
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.extensions.addFragment import im.vector.app.core.extensions.addFragment
import im.vector.app.core.extensions.addFragmentToBackstack import im.vector.app.core.extensions.addFragmentToBackstack
import im.vector.app.core.extensions.popBackstack import im.vector.app.core.extensions.popBackstack

View file

@ -16,12 +16,10 @@
package im.vector.app.features.roomdirectory package im.vector.app.features.roomdirectory
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.MavericksViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.ViewModelContext
import com.airbnb.mvrx.appendAt import com.airbnb.mvrx.appendAt
import dagger.assisted.Assisted import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory import dagger.assisted.AssistedFactory
@ -51,7 +49,7 @@ class RoomDirectoryViewModel @AssistedInject constructor(
) : VectorViewModel<PublicRoomsViewState, RoomDirectoryAction, RoomDirectoryViewEvents>(initialState) { ) : VectorViewModel<PublicRoomsViewState, RoomDirectoryAction, RoomDirectoryViewEvents>(initialState) {
@AssistedFactory @AssistedFactory
interface Factory: MavericksAssistedViewModelFactory<RoomDirectoryViewModel,PublicRoomsViewState> { interface Factory : MavericksAssistedViewModelFactory<RoomDirectoryViewModel, PublicRoomsViewState> {
override fun create(initialState: PublicRoomsViewState): RoomDirectoryViewModel override fun create(initialState: PublicRoomsViewState): RoomDirectoryViewModel
} }

View file

@ -22,7 +22,6 @@ import android.os.Bundle
import com.google.android.material.appbar.MaterialToolbar import com.google.android.material.appbar.MaterialToolbar
import dagger.hilt.android.AndroidEntryPoint import dagger.hilt.android.AndroidEntryPoint
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.extensions.addFragment import im.vector.app.core.extensions.addFragment
import im.vector.app.core.platform.ToolbarConfigurable import im.vector.app.core.platform.ToolbarConfigurable
import im.vector.app.core.platform.VectorBaseActivity import im.vector.app.core.platform.VectorBaseActivity

View file

@ -17,12 +17,10 @@
package im.vector.app.features.roomdirectory.picker package im.vector.app.features.roomdirectory.picker
import com.airbnb.mvrx.Fail import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MavericksViewModelFactory 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 dagger.assisted.Assisted import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory import dagger.assisted.AssistedFactory
import dagger.assisted.AssistedInject import dagger.assisted.AssistedInject
@ -47,7 +45,7 @@ class RoomDirectoryPickerViewModel @AssistedInject constructor(
) : VectorViewModel<RoomDirectoryPickerViewState, RoomDirectoryPickerAction, EmptyViewEvents>(initialState) { ) : VectorViewModel<RoomDirectoryPickerViewState, RoomDirectoryPickerAction, EmptyViewEvents>(initialState) {
@AssistedFactory @AssistedFactory
interface Factory: MavericksAssistedViewModelFactory<RoomDirectoryPickerViewModel,RoomDirectoryPickerViewState> { interface Factory : MavericksAssistedViewModelFactory<RoomDirectoryPickerViewModel, RoomDirectoryPickerViewState> {
override fun create(initialState: RoomDirectoryPickerViewState): RoomDirectoryPickerViewModel override fun create(initialState: RoomDirectoryPickerViewState): RoomDirectoryPickerViewModel
} }

View file

@ -49,7 +49,7 @@ class RoomPreviewViewModel @AssistedInject constructor(@Assisted private val ini
VectorViewModel<RoomPreviewViewState, RoomPreviewAction, EmptyViewEvents>(initialState) { VectorViewModel<RoomPreviewViewState, RoomPreviewAction, EmptyViewEvents>(initialState) {
@AssistedFactory @AssistedFactory
interface Factory: MavericksAssistedViewModelFactory<RoomPreviewViewModel,RoomPreviewViewState> { interface Factory : MavericksAssistedViewModelFactory<RoomPreviewViewModel, RoomPreviewViewState> {
override fun create(initialState: RoomPreviewViewState): RoomPreviewViewModel override fun create(initialState: RoomPreviewViewState): RoomPreviewViewModel
} }

View file

@ -25,15 +25,12 @@ import com.airbnb.mvrx.viewModel
import com.google.android.material.appbar.MaterialToolbar import com.google.android.material.appbar.MaterialToolbar
import dagger.hilt.android.AndroidEntryPoint import dagger.hilt.android.AndroidEntryPoint
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.extensions.addFragment import im.vector.app.core.extensions.addFragment
import im.vector.app.core.platform.ToolbarConfigurable import im.vector.app.core.platform.ToolbarConfigurable
import im.vector.app.core.platform.VectorBaseActivity import im.vector.app.core.platform.VectorBaseActivity
import im.vector.app.databinding.ActivitySimpleBinding import im.vector.app.databinding.ActivitySimpleBinding
import im.vector.app.features.room.RequireActiveMembershipViewEvents import im.vector.app.features.room.RequireActiveMembershipViewEvents
import im.vector.app.features.room.RequireActiveMembershipViewModel import im.vector.app.features.room.RequireActiveMembershipViewModel
import im.vector.app.features.room.RequireActiveMembershipViewState
import javax.inject.Inject
@AndroidEntryPoint @AndroidEntryPoint
class RoomMemberProfileActivity : class RoomMemberProfileActivity :

View file

@ -18,12 +18,10 @@
package im.vector.app.features.roommemberprofile 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.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MavericksViewModelFactory 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 dagger.assisted.Assisted import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory import dagger.assisted.AssistedFactory
import dagger.assisted.AssistedInject import dagger.assisted.AssistedInject

View file

@ -25,7 +25,6 @@ import com.airbnb.mvrx.viewModel
import com.google.android.material.appbar.MaterialToolbar import com.google.android.material.appbar.MaterialToolbar
import dagger.hilt.android.AndroidEntryPoint import dagger.hilt.android.AndroidEntryPoint
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.extensions.addFragment import im.vector.app.core.extensions.addFragment
import im.vector.app.core.extensions.addFragmentToBackstack import im.vector.app.core.extensions.addFragmentToBackstack
import im.vector.app.core.extensions.exhaustive import im.vector.app.core.extensions.exhaustive
@ -35,7 +34,6 @@ import im.vector.app.databinding.ActivitySimpleBinding
import im.vector.app.features.home.room.detail.RoomDetailPendingActionStore import im.vector.app.features.home.room.detail.RoomDetailPendingActionStore
import im.vector.app.features.room.RequireActiveMembershipViewEvents import im.vector.app.features.room.RequireActiveMembershipViewEvents
import im.vector.app.features.room.RequireActiveMembershipViewModel import im.vector.app.features.room.RequireActiveMembershipViewModel
import im.vector.app.features.room.RequireActiveMembershipViewState
import im.vector.app.features.roomprofile.alias.RoomAliasFragment import im.vector.app.features.roomprofile.alias.RoomAliasFragment
import im.vector.app.features.roomprofile.banned.RoomBannedMemberListFragment import im.vector.app.features.roomprofile.banned.RoomBannedMemberListFragment
import im.vector.app.features.roomprofile.members.RoomMemberListFragment import im.vector.app.features.roomprofile.members.RoomMemberListFragment

View file

@ -25,7 +25,6 @@ import androidx.recyclerview.widget.RecyclerView
import com.airbnb.mvrx.fragmentViewModel import com.airbnb.mvrx.fragmentViewModel
import com.airbnb.mvrx.withState import com.airbnb.mvrx.withState
import dagger.hilt.android.AndroidEntryPoint import dagger.hilt.android.AndroidEntryPoint
import im.vector.app.core.extensions.cleanup import im.vector.app.core.extensions.cleanup
import im.vector.app.core.extensions.configureWith import im.vector.app.core.extensions.configureWith
import im.vector.app.core.platform.VectorBaseBottomSheetDialogFragment import im.vector.app.core.platform.VectorBaseBottomSheetDialogFragment

View file

@ -35,7 +35,7 @@ class RoomNotificationSettingsViewModel @AssistedInject constructor(
) : VectorViewModel<RoomNotificationSettingsViewState, RoomNotificationSettingsAction, RoomNotificationSettingsViewEvents>(initialState) { ) : VectorViewModel<RoomNotificationSettingsViewState, RoomNotificationSettingsAction, RoomNotificationSettingsViewEvents>(initialState) {
@AssistedFactory @AssistedFactory
interface Factory: MavericksAssistedViewModelFactory<RoomNotificationSettingsViewModel,RoomNotificationSettingsViewState> { interface Factory : MavericksAssistedViewModelFactory<RoomNotificationSettingsViewModel, RoomNotificationSettingsViewState> {
override fun create(initialState: RoomNotificationSettingsViewState): RoomNotificationSettingsViewModel override fun create(initialState: RoomNotificationSettingsViewState): RoomNotificationSettingsViewModel
} }

View file

@ -42,7 +42,7 @@ class RoomPermissionsViewModel @AssistedInject constructor(@Assisted initialStat
VectorViewModel<RoomPermissionsViewState, RoomPermissionsAction, RoomPermissionsViewEvents>(initialState) { VectorViewModel<RoomPermissionsViewState, RoomPermissionsAction, RoomPermissionsViewEvents>(initialState) {
@AssistedFactory @AssistedFactory
interface Factory: MavericksAssistedViewModelFactory<RoomPermissionsViewModel,RoomPermissionsViewState> { interface Factory : MavericksAssistedViewModelFactory<RoomPermissionsViewModel, RoomPermissionsViewState> {
override fun create(initialState: RoomPermissionsViewState): RoomPermissionsViewModel override fun create(initialState: RoomPermissionsViewState): RoomPermissionsViewModel
} }

View file

@ -17,10 +17,7 @@
package im.vector.app.features.roomprofile.settings 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.FragmentViewModelContext
import com.airbnb.mvrx.MavericksViewModelFactory import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory import dagger.assisted.AssistedFactory
import dagger.assisted.AssistedInject import dagger.assisted.AssistedInject

View file

@ -22,7 +22,6 @@ import android.view.View
import com.airbnb.mvrx.fragmentViewModel import com.airbnb.mvrx.fragmentViewModel
import com.airbnb.mvrx.withState import com.airbnb.mvrx.withState
import dagger.hilt.android.AndroidEntryPoint import dagger.hilt.android.AndroidEntryPoint
import im.vector.app.core.ui.bottomsheet.BottomSheetGeneric import im.vector.app.core.ui.bottomsheet.BottomSheetGeneric
import im.vector.app.core.ui.bottomsheet.BottomSheetGenericController import im.vector.app.core.ui.bottomsheet.BottomSheetGenericController
import kotlinx.parcelize.Parcelize import kotlinx.parcelize.Parcelize

View file

@ -29,7 +29,6 @@ import com.airbnb.mvrx.viewModel
import com.airbnb.mvrx.withState import com.airbnb.mvrx.withState
import dagger.hilt.android.AndroidEntryPoint import dagger.hilt.android.AndroidEntryPoint
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.error.ErrorFormatter import im.vector.app.core.error.ErrorFormatter
import im.vector.app.core.extensions.addFragment import im.vector.app.core.extensions.addFragment
import im.vector.app.core.extensions.commitTransaction import im.vector.app.core.extensions.commitTransaction

View file

@ -22,7 +22,6 @@ import android.view.View
import com.airbnb.mvrx.fragmentViewModel import com.airbnb.mvrx.fragmentViewModel
import com.airbnb.mvrx.withState import com.airbnb.mvrx.withState
import dagger.hilt.android.AndroidEntryPoint import dagger.hilt.android.AndroidEntryPoint
import im.vector.app.core.ui.bottomsheet.BottomSheetGeneric import im.vector.app.core.ui.bottomsheet.BottomSheetGeneric
import im.vector.app.core.ui.bottomsheet.BottomSheetGenericController import im.vector.app.core.ui.bottomsheet.BottomSheetGenericController
import kotlinx.parcelize.Parcelize import kotlinx.parcelize.Parcelize

View file

@ -18,14 +18,11 @@ package im.vector.app.features.roomprofile.settings.joinrule.advanced
import android.graphics.Typeface import android.graphics.Typeface
import androidx.core.text.toSpannable import androidx.core.text.toSpannable
import com.airbnb.mvrx.ActivityViewModelContext
import com.airbnb.mvrx.Fail import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.FragmentViewModelContext
import com.airbnb.mvrx.Loading import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MavericksViewModelFactory 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 dagger.assisted.Assisted import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory import dagger.assisted.AssistedFactory
import dagger.assisted.AssistedInject import dagger.assisted.AssistedInject

View file

@ -39,7 +39,7 @@ class RoomUploadsViewModel @AssistedInject constructor(
) : VectorViewModel<RoomUploadsViewState, RoomUploadsAction, RoomUploadsViewEvents>(initialState) { ) : VectorViewModel<RoomUploadsViewState, RoomUploadsAction, RoomUploadsViewEvents>(initialState) {
@AssistedFactory @AssistedFactory
interface Factory: MavericksAssistedViewModelFactory<RoomUploadsViewModel,RoomUploadsViewState> { interface Factory : MavericksAssistedViewModelFactory<RoomUploadsViewModel, RoomUploadsViewState> {
override fun create(initialState: RoomUploadsViewState): RoomUploadsViewModel override fun create(initialState: RoomUploadsViewState): RoomUploadsViewModel
} }

View file

@ -27,7 +27,6 @@ import androidx.preference.Preference
import androidx.preference.PreferenceFragmentCompat import androidx.preference.PreferenceFragmentCompat
import dagger.hilt.android.AndroidEntryPoint import dagger.hilt.android.AndroidEntryPoint
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.extensions.replaceFragment import im.vector.app.core.extensions.replaceFragment
import im.vector.app.core.platform.VectorBaseActivity import im.vector.app.core.platform.VectorBaseActivity
import im.vector.app.databinding.ActivityVectorSettingsBinding import im.vector.app.databinding.ActivityVectorSettingsBinding

View file

@ -48,7 +48,7 @@ class DeactivateAccountViewModel @AssistedInject constructor(@Assisted private v
VectorViewModel<DeactivateAccountViewState, DeactivateAccountAction, DeactivateAccountViewEvents>(initialState) { VectorViewModel<DeactivateAccountViewState, DeactivateAccountAction, DeactivateAccountViewEvents>(initialState) {
@AssistedFactory @AssistedFactory
interface Factory: MavericksAssistedViewModelFactory<DeactivateAccountViewModel, DeactivateAccountViewState> { interface Factory : MavericksAssistedViewModelFactory<DeactivateAccountViewModel, DeactivateAccountViewState> {
override fun create(initialState: DeactivateAccountViewState): DeactivateAccountViewModel override fun create(initialState: DeactivateAccountViewState): DeactivateAccountViewModel
} }

View file

@ -26,7 +26,6 @@ import com.airbnb.mvrx.fragmentViewModel
import com.airbnb.mvrx.parentFragmentViewModel import com.airbnb.mvrx.parentFragmentViewModel
import com.airbnb.mvrx.withState import com.airbnb.mvrx.withState
import dagger.hilt.android.AndroidEntryPoint import dagger.hilt.android.AndroidEntryPoint
import im.vector.app.core.extensions.cleanup import im.vector.app.core.extensions.cleanup
import im.vector.app.core.extensions.configureWith import im.vector.app.core.extensions.configureWith
import im.vector.app.core.platform.VectorBaseBottomSheetDialogFragment import im.vector.app.core.platform.VectorBaseBottomSheetDialogFragment

View file

@ -35,11 +35,12 @@ class DeviceVerificationInfoBottomSheetViewModel @AssistedInject constructor(@As
) : VectorViewModel<DeviceVerificationInfoBottomSheetViewState, EmptyAction, EmptyViewEvents>(initialState) { ) : VectorViewModel<DeviceVerificationInfoBottomSheetViewState, EmptyAction, EmptyViewEvents>(initialState) {
@AssistedFactory @AssistedFactory
interface Factory: MavericksAssistedViewModelFactory<DeviceVerificationInfoBottomSheetViewModel,DeviceVerificationInfoBottomSheetViewState> { interface Factory : MavericksAssistedViewModelFactory<DeviceVerificationInfoBottomSheetViewModel, DeviceVerificationInfoBottomSheetViewState> {
override fun create(initialState: DeviceVerificationInfoBottomSheetViewState): DeviceVerificationInfoBottomSheetViewModel override fun create(initialState: DeviceVerificationInfoBottomSheetViewState): DeviceVerificationInfoBottomSheetViewModel
} }
companion object : MavericksViewModelFactory<DeviceVerificationInfoBottomSheetViewModel, DeviceVerificationInfoBottomSheetViewState> by hiltMavericksViewModelFactory() companion object : MavericksViewModelFactory<DeviceVerificationInfoBottomSheetViewModel, DeviceVerificationInfoBottomSheetViewState>
by hiltMavericksViewModelFactory()
init { init {

View file

@ -97,7 +97,7 @@ class DevicesViewModel @AssistedInject constructor(
var pendingAuth: UIABaseAuth? = null var pendingAuth: UIABaseAuth? = null
@AssistedFactory @AssistedFactory
interface Factory: MavericksAssistedViewModelFactory<DevicesViewModel,DevicesViewState> { interface Factory : MavericksAssistedViewModelFactory<DevicesViewModel, DevicesViewState> {
override fun create(initialState: DevicesViewState): DevicesViewModel override fun create(initialState: DevicesViewState): DevicesViewModel
} }

Some files were not shown because too many files have changed in this diff Show more