mirror of
https://github.com/element-hq/element-android
synced 2024-11-24 18:35:40 +03:00
Hilt: clean code and add changelog
This commit is contained in:
parent
e9b58844b3
commit
e6e8c7f7d1
147 changed files with 89 additions and 276 deletions
1
changelog.d/3888.misc
Normal file
1
changelog.d/3888.misc
Normal file
|
@ -0,0 +1 @@
|
|||
Migrate app DI framework to Hilt
|
|
@ -27,7 +27,6 @@ import androidx.core.content.getSystemService
|
|||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.di.ActiveSessionHolder
|
||||
|
||||
import im.vector.app.core.extensions.registerStartForActivityResult
|
||||
import im.vector.app.core.platform.VectorBaseActivity
|
||||
import im.vector.app.core.utils.PERMISSIONS_FOR_TAKING_PHOTO
|
||||
|
|
|
@ -17,7 +17,6 @@ package im.vector.app.gplay.features.settings.troubleshoot
|
|||
|
||||
import android.content.Intent
|
||||
import androidx.activity.result.ActivityResultLauncher
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.fragment.app.FragmentActivity
|
||||
import com.google.firebase.messaging.FirebaseMessaging
|
||||
import im.vector.app.R
|
||||
|
|
|
@ -17,7 +17,6 @@ package im.vector.app.gplay.features.settings.troubleshoot
|
|||
|
||||
import android.content.Intent
|
||||
import androidx.activity.result.ActivityResultLauncher
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.fragment.app.FragmentActivity
|
||||
import com.google.android.gms.common.ConnectionResult
|
||||
import com.google.android.gms.common.GoogleApiAvailability
|
||||
|
|
|
@ -17,7 +17,6 @@ package im.vector.app.gplay.features.settings.troubleshoot
|
|||
|
||||
import android.content.Intent
|
||||
import androidx.activity.result.ActivityResultLauncher
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.fragment.app.FragmentActivity
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.di.ActiveSessionHolder
|
||||
|
|
|
@ -17,7 +17,6 @@ package im.vector.app.gplay.features.settings.troubleshoot
|
|||
|
||||
import android.content.Intent
|
||||
import androidx.activity.result.ActivityResultLauncher
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.fragment.app.FragmentActivity
|
||||
import androidx.lifecycle.Observer
|
||||
import androidx.work.WorkInfo
|
||||
|
|
|
@ -23,7 +23,6 @@ import dagger.Binds
|
|||
import dagger.Module
|
||||
import dagger.hilt.InstallIn
|
||||
import dagger.hilt.android.components.ActivityComponent
|
||||
import dagger.hilt.migration.DisableInstallInCheck
|
||||
import dagger.multibindings.IntoMap
|
||||
import im.vector.app.features.attachments.preview.AttachmentsPreviewFragment
|
||||
import im.vector.app.features.contactsbook.ContactsBookFragment
|
||||
|
|
|
@ -63,7 +63,6 @@ class HiltMavericksViewModelFactory<VM : MavericksViewModel<S>, S : MavericksSta
|
|||
override fun initialState(viewModelContext: ViewModelContext): S? {
|
||||
return super.initialState(viewModelContext)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -33,5 +33,4 @@ object HomeModule {
|
|||
fun providesTimelineBackgroundHandler(): Handler {
|
||||
return TimelineAsyncHelper.getBackgroundHandler()
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -21,7 +21,6 @@ import com.bumptech.glide.Glide
|
|||
import com.bumptech.glide.load.model.GlideUrl
|
||||
import com.github.piasy.biv.BigImageViewer
|
||||
import com.github.piasy.biv.loader.glide.GlideImageLoader
|
||||
import dagger.hilt.android.qualifiers.ApplicationContext
|
||||
import im.vector.app.ActiveSessionDataSource
|
||||
import im.vector.app.core.glide.FactoryUrl
|
||||
import org.matrix.android.sdk.api.session.Session
|
||||
|
|
|
@ -41,7 +41,6 @@ import im.vector.app.features.home.PromoteRestrictedViewModel
|
|||
import im.vector.app.features.home.UnknownDeviceDetectorSharedViewModel
|
||||
import im.vector.app.features.home.UnreadMessagesSharedViewModel
|
||||
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.search.SearchViewModel
|
||||
import im.vector.app.features.home.room.detail.timeline.action.MessageActionsViewModel
|
||||
|
@ -541,6 +540,4 @@ interface MavericksViewModelModule {
|
|||
@IntoMap
|
||||
@MavericksViewModelKey(VerificationBottomSheetViewModel::class)
|
||||
fun verificationBottomSheetViewModelFactory(factory: VerificationBottomSheetViewModel.Factory): MavericksAssistedViewModelFactory<*, *>
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -38,7 +38,6 @@ import com.jakewharton.rxbinding3.view.clicks
|
|||
import dagger.hilt.android.EntryPointAccessors
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.di.ActivityEntryPoint
|
||||
|
||||
import im.vector.app.core.dialogs.UnrecognizedCertificateDialog
|
||||
import im.vector.app.core.error.ErrorFormatter
|
||||
import im.vector.app.core.extensions.singletonEntryPoint
|
||||
|
@ -95,7 +94,7 @@ abstract class VectorBaseFragment<VB : ViewBinding> : Fragment(), MavericksView
|
|||
|
||||
override fun onAttach(context: Context) {
|
||||
val singletonEntryPoint = context.singletonEntryPoint()
|
||||
val activityEntryPoint = EntryPointAccessors.fromActivity(vectorBaseActivity,ActivityEntryPoint::class.java)
|
||||
val activityEntryPoint = EntryPointAccessors.fromActivity(vectorBaseActivity, ActivityEntryPoint::class.java)
|
||||
navigator = singletonEntryPoint.navigator()
|
||||
errorFormatter = singletonEntryPoint.errorFormatter()
|
||||
unrecognizedCertificateDialog = singletonEntryPoint.unrecognizedCertificateDialog()
|
||||
|
|
|
@ -27,7 +27,6 @@ import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
|||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.di.ActiveSessionHolder
|
||||
|
||||
import im.vector.app.core.error.ErrorFormatter
|
||||
import im.vector.app.core.extensions.startSyncing
|
||||
import im.vector.app.core.platform.VectorBaseActivity
|
||||
|
|
|
@ -31,7 +31,6 @@ import com.airbnb.mvrx.viewModel
|
|||
import com.airbnb.mvrx.withState
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import im.vector.app.R
|
||||
|
||||
import im.vector.app.core.extensions.addFragment
|
||||
import im.vector.app.core.platform.SimpleFragmentActivity
|
||||
import im.vector.app.core.utils.openUrlInChromeCustomTab
|
||||
|
@ -44,7 +43,7 @@ import timber.log.Timber
|
|||
import javax.inject.Inject
|
||||
|
||||
@AndroidEntryPoint
|
||||
class ReAuthActivity : SimpleFragmentActivity(){
|
||||
class ReAuthActivity : SimpleFragmentActivity() {
|
||||
|
||||
@Parcelize
|
||||
data class Args(
|
||||
|
|
|
@ -16,10 +16,7 @@
|
|||
|
||||
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.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedFactory
|
||||
import dagger.assisted.AssistedInject
|
||||
|
@ -37,7 +34,7 @@ class ReAuthViewModel @AssistedInject constructor(
|
|||
) : VectorViewModel<ReAuthState, ReAuthActions, ReAuthEvents>(initialState) {
|
||||
|
||||
@AssistedFactory
|
||||
interface Factory: MavericksAssistedViewModelFactory<ReAuthViewModel,ReAuthState> {
|
||||
interface Factory : MavericksAssistedViewModelFactory<ReAuthViewModel, ReAuthState> {
|
||||
override fun create(initialState: ReAuthState): ReAuthViewModel
|
||||
}
|
||||
|
||||
|
|
|
@ -95,7 +95,6 @@ class VectorCallActivity : VectorBaseActivity<ActivityCallBinding>(), CallContro
|
|||
|
||||
private val callViewModel: VectorCallViewModel by viewModel()
|
||||
|
||||
|
||||
private val dialPadCallback = object : DialPadFragment.Callback {
|
||||
override fun onDigitAppended(digit: String) {
|
||||
callViewModel.handle(VectorCallViewActions.SendDtmfDigit(digit))
|
||||
|
|
|
@ -21,7 +21,6 @@ import com.airbnb.mvrx.Fail
|
|||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedFactory
|
||||
import dagger.assisted.AssistedInject
|
||||
|
@ -343,7 +342,7 @@ class VectorCallViewModel @AssistedInject constructor(
|
|||
}
|
||||
|
||||
@AssistedFactory
|
||||
interface Factory: MavericksAssistedViewModelFactory<VectorCallViewModel,VectorCallViewState> {
|
||||
interface Factory : MavericksAssistedViewModelFactory<VectorCallViewModel, VectorCallViewState> {
|
||||
override fun create(initialState: VectorCallViewState): VectorCallViewModel
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,6 @@ import com.airbnb.mvrx.Fail
|
|||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedFactory
|
||||
import dagger.assisted.AssistedInject
|
||||
|
@ -48,7 +47,7 @@ class JitsiCallViewModel @AssistedInject constructor(
|
|||
) : VectorViewModel<JitsiCallViewState, JitsiCallViewActions, JitsiCallViewEvents>(initialState) {
|
||||
|
||||
@AssistedFactory
|
||||
interface Factory: MavericksAssistedViewModelFactory<JitsiCallViewModel,JitsiCallViewState> {
|
||||
interface Factory : MavericksAssistedViewModelFactory<JitsiCallViewModel, JitsiCallViewState> {
|
||||
override fun create(initialState: JitsiCallViewState): JitsiCallViewModel
|
||||
}
|
||||
|
||||
|
@ -148,6 +147,4 @@ class JitsiCallViewModel @AssistedInject constructor(
|
|||
companion object : MavericksViewModelFactory<JitsiCallViewModel, JitsiCallViewState> by hiltMavericksViewModelFactory() {
|
||||
const val ENABLE_VIDEO_OPTION = "ENABLE_VIDEO_OPTION"
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -28,10 +28,9 @@ data class JitsiCallViewState(
|
|||
val widget: Async<Widget> = Uninitialized
|
||||
) : MavericksState {
|
||||
|
||||
constructor(args: VectorJitsiActivity.Args): this(
|
||||
constructor(args: VectorJitsiActivity.Args) : this(
|
||||
roomId = args.roomId,
|
||||
widgetId = args.widgetId,
|
||||
enableVideo = args.enableVideo
|
||||
)
|
||||
|
||||
}
|
||||
|
|
|
@ -35,7 +35,6 @@ import com.facebook.react.modules.core.PermissionListener
|
|||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import im.vector.app.R
|
||||
|
||||
import im.vector.app.core.extensions.exhaustive
|
||||
import im.vector.app.core.platform.VectorBaseActivity
|
||||
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 timber.log.Timber
|
||||
import java.net.URL
|
||||
import javax.inject.Inject
|
||||
|
||||
@AndroidEntryPoint
|
||||
class VectorJitsiActivity : VectorBaseActivity<ActivityJitsiBinding>(), JitsiMeetActivityInterface {
|
||||
|
|
|
@ -25,14 +25,9 @@ import com.airbnb.mvrx.viewModel
|
|||
import com.google.android.material.tabs.TabLayoutMediator
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import im.vector.app.R
|
||||
|
||||
import im.vector.app.core.error.ErrorFormatter
|
||||
import im.vector.app.core.platform.VectorBaseActivity
|
||||
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 javax.inject.Inject
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ class CallTransferViewModel @AssistedInject constructor(@Assisted initialState:
|
|||
VectorViewModel<CallTransferViewState, CallTransferAction, CallTransferViewEvents>(initialState) {
|
||||
|
||||
@AssistedFactory
|
||||
interface Factory: MavericksAssistedViewModelFactory<CallTransferViewModel,CallTransferViewState> {
|
||||
interface Factory : MavericksAssistedViewModelFactory<CallTransferViewModel, CallTransferViewState> {
|
||||
override fun create(initialState: CallTransferViewState): CallTransferViewModel
|
||||
}
|
||||
|
||||
|
|
|
@ -17,12 +17,9 @@
|
|||
package im.vector.app.features.contactsbook
|
||||
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.airbnb.mvrx.ActivityViewModelContext
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedFactory
|
||||
import dagger.assisted.AssistedInject
|
||||
|
@ -47,7 +44,7 @@ class ContactsBookViewModel @AssistedInject constructor(@Assisted
|
|||
VectorViewModel<ContactsBookViewState, ContactsBookAction, EmptyViewEvents>(initialState) {
|
||||
|
||||
@AssistedFactory
|
||||
interface Factory: MavericksAssistedViewModelFactory<ContactsBookViewModel,ContactsBookViewState> {
|
||||
interface Factory : MavericksAssistedViewModelFactory<ContactsBookViewModel, ContactsBookViewState> {
|
||||
override fun create(initialState: ContactsBookViewState): ContactsBookViewModel
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,6 @@ import com.airbnb.mvrx.viewModel
|
|||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import im.vector.app.R
|
||||
|
||||
import im.vector.app.core.error.ErrorFormatter
|
||||
import im.vector.app.core.extensions.addFragment
|
||||
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.registerForPermissionsResult
|
||||
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.UserListFragmentArgs
|
||||
import im.vector.app.features.userdirectory.UserListSharedAction
|
||||
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.session.room.failure.CreateRoomFailure
|
||||
import java.net.HttpURLConnection
|
||||
import javax.inject.Inject
|
||||
|
||||
@AndroidEntryPoint
|
||||
class CreateDirectRoomActivity : SimpleFragmentActivity(){
|
||||
class CreateDirectRoomActivity : SimpleFragmentActivity() {
|
||||
|
||||
private val viewModel: CreateDirectRoomViewModel by viewModel()
|
||||
private lateinit var sharedActionViewModel: UserListSharedActionViewModel
|
||||
|
|
|
@ -43,7 +43,7 @@ class CreateDirectRoomViewModel @AssistedInject constructor(@Assisted
|
|||
VectorViewModel<CreateDirectRoomViewState, CreateDirectRoomAction, CreateDirectRoomViewEvents>(initialState) {
|
||||
|
||||
@AssistedFactory
|
||||
interface Factory: MavericksAssistedViewModelFactory<CreateDirectRoomViewModel,CreateDirectRoomViewState> {
|
||||
interface Factory : MavericksAssistedViewModelFactory<CreateDirectRoomViewModel, CreateDirectRoomViewState> {
|
||||
override fun create(initialState: CreateDirectRoomViewState): CreateDirectRoomViewModel
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,6 @@ import im.vector.app.core.extensions.replaceFragment
|
|||
import im.vector.app.core.platform.SimpleFragmentActivity
|
||||
import im.vector.app.core.ui.views.KeysBackupBanner
|
||||
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 javax.inject.Inject
|
||||
|
||||
|
|
|
@ -23,11 +23,9 @@ import com.airbnb.mvrx.viewModel
|
|||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import im.vector.app.R
|
||||
|
||||
import im.vector.app.core.extensions.replaceFragment
|
||||
import im.vector.app.core.platform.SimpleFragmentActivity
|
||||
import im.vector.app.core.platform.WaitingViewData
|
||||
import javax.inject.Inject
|
||||
|
||||
@AndroidEntryPoint
|
||||
class KeysBackupManageActivity : SimpleFragmentActivity() {
|
||||
|
|
|
@ -41,7 +41,7 @@ class KeysBackupSettingsViewModel @AssistedInject constructor(@Assisted initialS
|
|||
KeysBackupStateListener {
|
||||
|
||||
@AssistedFactory
|
||||
interface Factory: MavericksAssistedViewModelFactory<KeysBackupSettingsViewModel,KeysBackupSettingViewState> {
|
||||
interface Factory : MavericksAssistedViewModelFactory<KeysBackupSettingsViewModel, KeysBackupSettingViewState> {
|
||||
override fun create(initialState: KeysBackupSettingViewState): KeysBackupSettingsViewModel
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,6 @@ import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
|||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.di.ActiveSessionHolder
|
||||
|
||||
import im.vector.app.core.dialogs.ExportKeysDialog
|
||||
import im.vector.app.core.extensions.observeEvent
|
||||
import im.vector.app.core.extensions.queryExportKeys
|
||||
|
|
|
@ -30,7 +30,6 @@ import com.airbnb.mvrx.viewModel
|
|||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import im.vector.app.R
|
||||
|
||||
import im.vector.app.core.error.ErrorFormatter
|
||||
import im.vector.app.core.extensions.commitTransaction
|
||||
import im.vector.app.core.platform.SimpleFragmentActivity
|
||||
|
|
|
@ -19,12 +19,10 @@ package im.vector.app.features.crypto.quads
|
|||
import com.airbnb.mvrx.Async
|
||||
import com.airbnb.mvrx.Fail
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.Mavericks
|
||||
import com.airbnb.mvrx.MavericksState
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedFactory
|
||||
import dagger.assisted.AssistedInject
|
||||
|
@ -62,7 +60,7 @@ data class SharedSecureStorageViewState(
|
|||
val resultKeyStoreAlias: String
|
||||
) : MavericksState {
|
||||
|
||||
constructor(args: SharedSecureStorageActivity.Args): this(
|
||||
constructor(args: SharedSecureStorageActivity.Args) : this(
|
||||
keyId = args.keyId,
|
||||
requestedSecrets = args.requestedSecrets,
|
||||
resultKeyStoreAlias = args.resultKeyStoreAlias
|
||||
|
@ -82,7 +80,7 @@ class SharedSecureStorageViewModel @AssistedInject constructor(
|
|||
VectorViewModel<SharedSecureStorageViewState, SharedSecureStorageAction, SharedSecureStorageViewEvent>(initialState) {
|
||||
|
||||
@AssistedFactory
|
||||
interface Factory: MavericksAssistedViewModelFactory<SharedSecureStorageViewModel,SharedSecureStorageViewState> {
|
||||
interface Factory : MavericksAssistedViewModelFactory<SharedSecureStorageViewModel, SharedSecureStorageViewState> {
|
||||
override fun create(initialState: SharedSecureStorageViewState): SharedSecureStorageViewModel
|
||||
}
|
||||
|
||||
|
@ -90,8 +88,8 @@ class SharedSecureStorageViewModel @AssistedInject constructor(
|
|||
setState {
|
||||
copy(userId = session.myUserId)
|
||||
}
|
||||
val isValid = session.sharedSecretStorageService.checkShouldBeAbleToAccessSecrets(initialState.requestedSecrets, initialState.keyId) is IntegrityResult.Success
|
||||
if (!isValid) {
|
||||
val integrityResult = session.sharedSecretStorageService.checkShouldBeAbleToAccessSecrets(initialState.requestedSecrets, initialState.keyId)
|
||||
if (integrityResult !is IntegrityResult.Success) {
|
||||
_viewEvents.post(
|
||||
SharedSecureStorageViewEvent.Error(
|
||||
stringProvider.getString(R.string.enter_secret_storage_invalid),
|
||||
|
|
|
@ -35,7 +35,6 @@ import com.airbnb.mvrx.withState
|
|||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import im.vector.app.R
|
||||
|
||||
import im.vector.app.core.extensions.commitTransaction
|
||||
import im.vector.app.core.extensions.exhaustive
|
||||
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 kotlinx.parcelize.Parcelize
|
||||
import org.matrix.android.sdk.api.auth.data.LoginFlowTypes
|
||||
import javax.inject.Inject
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
@AndroidEntryPoint
|
||||
|
|
|
@ -17,12 +17,10 @@
|
|||
package im.vector.app.features.crypto.recover
|
||||
|
||||
import com.airbnb.mvrx.Fail
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.nulabinc.zxcvbn.Zxcvbn
|
||||
import dagger.assisted.Assisted
|
||||
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.resources.StringProvider
|
||||
import im.vector.app.features.auth.ReAuthActivity
|
||||
import im.vector.app.features.login.ReAuthHelper
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
import org.matrix.android.sdk.api.auth.UIABaseAuth
|
||||
|
|
|
@ -37,6 +37,5 @@ data class BootstrapViewState(
|
|||
val recoverySaveFileProcess: Async<Unit> = Uninitialized
|
||||
) : MavericksState {
|
||||
|
||||
constructor(args: BootstrapBottomSheet.Args): this(setupMode = args.setUpMode)
|
||||
|
||||
constructor(args: BootstrapBottomSheet.Args) : this(setupMode = args.setUpMode)
|
||||
}
|
||||
|
|
|
@ -30,7 +30,6 @@ import com.airbnb.mvrx.withState
|
|||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import im.vector.app.R
|
||||
|
||||
import im.vector.app.core.extensions.commitTransaction
|
||||
import im.vector.app.core.extensions.exhaustive
|
||||
import im.vector.app.core.extensions.registerStartForActivityResult
|
||||
|
|
|
@ -22,8 +22,8 @@ import dagger.assisted.Assisted
|
|||
import dagger.assisted.AssistedFactory
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.hilt.EntryPoints
|
||||
import im.vector.app.core.di.SingletonEntryPoint
|
||||
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.platform.EmptyAction
|
||||
import im.vector.app.core.platform.EmptyViewEvents
|
||||
|
|
|
@ -27,8 +27,8 @@ import dagger.assisted.Assisted
|
|||
import dagger.assisted.AssistedFactory
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.hilt.EntryPoints
|
||||
import im.vector.app.core.di.SingletonEntryPoint
|
||||
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.platform.EmptyAction
|
||||
import im.vector.app.core.platform.EmptyViewEvents
|
||||
|
@ -153,7 +153,7 @@ class VerificationEmojiCodeViewModel @AssistedInject constructor(
|
|||
}
|
||||
|
||||
@AssistedFactory
|
||||
interface Factory: MavericksAssistedViewModelFactory<VerificationEmojiCodeViewModel,VerificationEmojiCodeViewState> {
|
||||
interface Factory : MavericksAssistedViewModelFactory<VerificationEmojiCodeViewModel, VerificationEmojiCodeViewState> {
|
||||
override fun create(initialState: VerificationEmojiCodeViewState): VerificationEmojiCodeViewModel
|
||||
}
|
||||
|
||||
|
|
|
@ -22,8 +22,8 @@ import dagger.assisted.AssistedFactory
|
|||
import dagger.assisted.AssistedInject
|
||||
import dagger.hilt.EntryPoints
|
||||
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.SingletonEntryPoint
|
||||
import im.vector.app.core.di.hiltMavericksViewModelFactory
|
||||
import im.vector.app.core.extensions.exhaustive
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
|
@ -43,7 +43,7 @@ class SetIdentityServerViewModel @AssistedInject constructor(
|
|||
VectorViewModel<SetIdentityServerState, SetIdentityServerAction, SetIdentityServerViewEvents>(initialState) {
|
||||
|
||||
@AssistedFactory
|
||||
interface Factory: MavericksAssistedViewModelFactory<SetIdentityServerViewModel,SetIdentityServerState> {
|
||||
interface Factory : MavericksAssistedViewModelFactory<SetIdentityServerViewModel, SetIdentityServerState> {
|
||||
override fun create(initialState: SetIdentityServerState): SetIdentityServerViewModel
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,6 @@ class SetIdentityServerViewModel @AssistedInject constructor(
|
|||
defaultIdentityServerUrl = session.identityService().getDefaultIdentityServer()
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var currentWantedUrl: String? = null
|
||||
|
|
|
@ -38,7 +38,6 @@ import dagger.hilt.android.AndroidEntryPoint
|
|||
import im.vector.app.AppStateHandler
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.di.ActiveSessionHolder
|
||||
|
||||
import im.vector.app.core.extensions.exhaustive
|
||||
import im.vector.app.core.extensions.hideKeyboard
|
||||
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.themes.ThemeUtils
|
||||
import im.vector.app.features.workers.signout.ServerBackupStatusViewModel
|
||||
import im.vector.app.features.workers.signout.ServerBackupStatusViewState
|
||||
import im.vector.app.push.fcm.FcmHelper
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
|
|
@ -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.workers.signout.BannerState
|
||||
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.room.model.RoomSummary
|
||||
import org.matrix.android.sdk.internal.crypto.model.rest.DeviceInfo
|
||||
|
@ -500,5 +499,4 @@ class HomeDetailFragment @Inject constructor(
|
|||
}
|
||||
return this
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -22,10 +22,8 @@ import com.airbnb.mvrx.ViewModelContext
|
|||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedFactory
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.hilt.EntryPoints
|
||||
import im.vector.app.AppStateHandler
|
||||
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.hiltMavericksViewModelFactory
|
||||
import im.vector.app.core.extensions.singletonEntryPoint
|
||||
|
@ -72,11 +70,11 @@ class HomeDetailViewModel @AssistedInject constructor(@Assisted initialState: Ho
|
|||
CallProtocolsChecker.Listener {
|
||||
|
||||
@AssistedFactory
|
||||
interface Factory: MavericksAssistedViewModelFactory<HomeDetailViewModel,HomeDetailViewState> {
|
||||
interface Factory : MavericksAssistedViewModelFactory<HomeDetailViewModel, HomeDetailViewState> {
|
||||
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 {
|
||||
val uiStateRepository = viewModelContext.activity.singletonEntryPoint().uiStateRepository()
|
||||
|
|
|
@ -16,11 +16,8 @@
|
|||
|
||||
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.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedFactory
|
||||
import dagger.assisted.AssistedInject
|
||||
|
@ -74,7 +71,7 @@ class PromoteRestrictedViewModel @AssistedInject constructor(
|
|||
}
|
||||
|
||||
@AssistedFactory
|
||||
interface Factory: MavericksAssistedViewModelFactory<PromoteRestrictedViewModel,ActiveSpaceViewState> {
|
||||
interface Factory : MavericksAssistedViewModelFactory<PromoteRestrictedViewModel, ActiveSpaceViewState> {
|
||||
override fun create(initialState: ActiveSpaceViewState): PromoteRestrictedViewModel
|
||||
}
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ class UnknownDeviceDetectorSharedViewModel @AssistedInject constructor(@Assisted
|
|||
}
|
||||
|
||||
@AssistedFactory
|
||||
interface Factory: MavericksAssistedViewModelFactory<UnknownDeviceDetectorSharedViewModel,UnknownDevicesState> {
|
||||
interface Factory : MavericksAssistedViewModelFactory<UnknownDeviceDetectorSharedViewModel, UnknownDevicesState> {
|
||||
override fun create(initialState: UnknownDevicesState): UnknownDeviceDetectorSharedViewModel
|
||||
}
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ class UnreadMessagesSharedViewModel @AssistedInject constructor(@Assisted initia
|
|||
VectorViewModel<UnreadMessagesState, EmptyAction, EmptyViewEvents>(initialState) {
|
||||
|
||||
@AssistedFactory
|
||||
interface Factory: MavericksAssistedViewModelFactory<UnreadMessagesSharedViewModel,UnreadMessagesState> {
|
||||
interface Factory : MavericksAssistedViewModelFactory<UnreadMessagesSharedViewModel, UnreadMessagesState> {
|
||||
override fun create(initialState: UnreadMessagesState): UnreadMessagesSharedViewModel
|
||||
}
|
||||
|
||||
|
|
|
@ -16,9 +16,7 @@
|
|||
|
||||
package im.vector.app.features.home.room.breadcrumbs
|
||||
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedFactory
|
||||
import dagger.assisted.AssistedInject
|
||||
|
|
|
@ -27,7 +27,6 @@ import com.airbnb.mvrx.Uninitialized
|
|||
import com.airbnb.mvrx.parentFragmentViewModel
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import im.vector.app.R
|
||||
|
||||
import im.vector.app.core.epoxy.ClickListener
|
||||
import im.vector.app.core.error.ErrorFormatter
|
||||
import im.vector.app.core.platform.ButtonStateView
|
||||
|
|
|
@ -29,7 +29,6 @@ import com.airbnb.mvrx.viewModel
|
|||
import com.google.android.material.appbar.MaterialToolbar
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import im.vector.app.R
|
||||
|
||||
import im.vector.app.core.extensions.hideKeyboard
|
||||
import im.vector.app.core.extensions.replaceFragment
|
||||
import im.vector.app.core.platform.ToolbarConfigurable
|
||||
|
|
|
@ -16,9 +16,7 @@
|
|||
|
||||
package im.vector.app.features.home.room.detail.composer
|
||||
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedFactory
|
||||
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.ParsedCommand
|
||||
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.toMessageType
|
||||
import im.vector.app.features.powerlevel.PowerLevelsFlowFactory
|
||||
|
@ -712,7 +709,7 @@ class TextComposerViewModel @AssistedInject constructor(
|
|||
}
|
||||
|
||||
@AssistedFactory
|
||||
interface Factory: MavericksAssistedViewModelFactory<TextComposerViewModel,TextComposerViewState> {
|
||||
interface Factory : MavericksAssistedViewModelFactory<TextComposerViewModel, TextComposerViewState> {
|
||||
override fun create(initialState: TextComposerViewState): TextComposerViewModel
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,6 @@ import androidx.appcompat.widget.SearchView
|
|||
import com.airbnb.mvrx.Mavericks
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import im.vector.app.R
|
||||
|
||||
import im.vector.app.core.extensions.addFragment
|
||||
import im.vector.app.core.platform.VectorBaseActivity
|
||||
import im.vector.app.databinding.ActivitySearchBinding
|
||||
|
|
|
@ -45,7 +45,7 @@ class SearchViewModel @AssistedInject constructor(
|
|||
private var nextBatch: String? = null
|
||||
|
||||
@AssistedFactory
|
||||
interface Factory: MavericksAssistedViewModelFactory<SearchViewModel,SearchViewState> {
|
||||
interface Factory : MavericksAssistedViewModelFactory<SearchViewModel, SearchViewState> {
|
||||
override fun create(initialState: SearchViewState): SearchViewModel
|
||||
}
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@ class MessageActionsViewModel @AssistedInject constructor(@Assisted
|
|||
private val eventIdFlow = MutableStateFlow(initialState.eventId)
|
||||
|
||||
@AssistedFactory
|
||||
interface Factory: MavericksAssistedViewModelFactory<MessageActionsViewModel,MessageActionState> {
|
||||
interface Factory : MavericksAssistedViewModelFactory<MessageActionsViewModel, MessageActionState> {
|
||||
override fun create(initialState: MessageActionState): MessageActionsViewModel
|
||||
}
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ class ViewEditHistoryViewModel @AssistedInject constructor(
|
|||
?: throw IllegalStateException("Shouldn't use this ViewModel without a room")
|
||||
|
||||
@AssistedFactory
|
||||
interface Factory: MavericksAssistedViewModelFactory<ViewEditHistoryViewModel,ViewEditHistoryViewState> {
|
||||
interface Factory : MavericksAssistedViewModelFactory<ViewEditHistoryViewModel, ViewEditHistoryViewState> {
|
||||
override fun create(initialState: ViewEditHistoryViewState): ViewEditHistoryViewModel
|
||||
}
|
||||
|
||||
|
|
|
@ -17,11 +17,9 @@
|
|||
package im.vector.app.features.home.room.detail.timeline.reactions
|
||||
|
||||
import com.airbnb.mvrx.Async
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MavericksState
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedFactory
|
||||
import dagger.assisted.AssistedInject
|
||||
|
@ -72,7 +70,7 @@ class ViewReactionsViewModel @AssistedInject constructor(@Assisted
|
|||
?: throw IllegalStateException("Shouldn't use this ViewModel without a room")
|
||||
|
||||
@AssistedFactory
|
||||
interface Factory: MavericksAssistedViewModelFactory<ViewReactionsViewModel,DisplayReactionsViewState> {
|
||||
interface Factory : MavericksAssistedViewModelFactory<ViewReactionsViewModel, DisplayReactionsViewState> {
|
||||
override fun create(initialState: DisplayReactionsViewState): ViewReactionsViewModel
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,6 @@ import com.airbnb.mvrx.fragmentViewModel
|
|||
import com.airbnb.mvrx.withState
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import im.vector.app.R
|
||||
|
||||
import im.vector.app.core.error.ErrorFormatter
|
||||
import im.vector.app.core.extensions.setTextOrHide
|
||||
import im.vector.app.core.platform.VectorBaseBottomSheetDialogFragment
|
||||
|
@ -39,7 +38,7 @@ import javax.inject.Inject
|
|||
|
||||
@AndroidEntryPoint
|
||||
class MigrateRoomBottomSheet :
|
||||
VectorBaseBottomSheetDialogFragment<BottomSheetRoomUpgradeBinding>(){
|
||||
VectorBaseBottomSheetDialogFragment<BottomSheetRoomUpgradeBinding>() {
|
||||
|
||||
enum class MigrationReason {
|
||||
MANUAL,
|
||||
|
|
|
@ -50,7 +50,7 @@ class MigrateRoomViewModel @AssistedInject constructor(
|
|||
}
|
||||
|
||||
@AssistedFactory
|
||||
interface Factory: MavericksAssistedViewModelFactory<MigrateRoomViewModel,MigrateRoomViewState> {
|
||||
interface Factory : MavericksAssistedViewModelFactory<MigrateRoomViewModel, MigrateRoomViewState> {
|
||||
override fun create(initialState: MigrateRoomViewState): MigrateRoomViewModel
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,6 @@ import com.airbnb.mvrx.parentFragmentViewModel
|
|||
import com.airbnb.mvrx.withState
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import im.vector.app.R
|
||||
|
||||
import im.vector.app.core.extensions.cleanup
|
||||
import im.vector.app.core.extensions.configureWith
|
||||
import im.vector.app.core.platform.VectorBaseBottomSheetDialogFragment
|
||||
|
|
|
@ -22,7 +22,6 @@ import android.os.Bundle
|
|||
import androidx.appcompat.widget.SearchView
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import im.vector.app.R
|
||||
|
||||
import im.vector.app.core.extensions.replaceFragment
|
||||
import im.vector.app.core.platform.VectorBaseActivity
|
||||
import im.vector.app.databinding.ActivityFilteredRoomsBinding
|
||||
|
|
|
@ -19,11 +19,9 @@ package im.vector.app.features.home.room.list
|
|||
import androidx.lifecycle.MutableLiveData
|
||||
import com.airbnb.mvrx.Async
|
||||
import com.airbnb.mvrx.Fail
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedFactory
|
||||
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.flow.flow
|
||||
import timber.log.Timber
|
||||
import javax.inject.Inject
|
||||
|
||||
class RoomListViewModel @AssistedInject constructor(
|
||||
@Assisted initialState: RoomListViewState,
|
||||
|
@ -63,7 +60,7 @@ class RoomListViewModel @AssistedInject constructor(
|
|||
) : VectorViewModel<RoomListViewState, RoomListAction, RoomListViewEvents>(initialState) {
|
||||
|
||||
@AssistedFactory
|
||||
interface Factory: MavericksAssistedViewModelFactory<RoomListViewModel, RoomListViewState> {
|
||||
interface Factory : MavericksAssistedViewModelFactory<RoomListViewModel, RoomListViewState> {
|
||||
override fun create(initialState: RoomListViewState): RoomListViewModel
|
||||
}
|
||||
|
||||
|
|
|
@ -22,8 +22,8 @@ import dagger.assisted.Assisted
|
|||
import dagger.assisted.AssistedFactory
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.hilt.EntryPoints
|
||||
import im.vector.app.core.di.SingletonEntryPoint
|
||||
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.platform.EmptyAction
|
||||
import im.vector.app.core.platform.EmptyViewEvents
|
||||
|
@ -44,7 +44,7 @@ class HomeServerCapabilitiesViewModel @AssistedInject constructor(
|
|||
) : VectorViewModel<HomeServerCapabilitiesViewState, EmptyAction, EmptyViewEvents>(initialState) {
|
||||
|
||||
@AssistedFactory
|
||||
interface Factory: MavericksAssistedViewModelFactory<HomeServerCapabilitiesViewModel,HomeServerCapabilitiesViewState> {
|
||||
interface Factory : MavericksAssistedViewModelFactory<HomeServerCapabilitiesViewModel, HomeServerCapabilitiesViewState> {
|
||||
override fun create(initialState: HomeServerCapabilitiesViewState): HomeServerCapabilitiesViewModel
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,6 @@ import com.airbnb.mvrx.viewModel
|
|||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import im.vector.app.R
|
||||
|
||||
import im.vector.app.core.error.ErrorFormatter
|
||||
import im.vector.app.core.extensions.addFragment
|
||||
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.toast
|
||||
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.UserListFragmentArgs
|
||||
import im.vector.app.features.userdirectory.UserListSharedAction
|
||||
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 org.matrix.android.sdk.api.failure.Failure
|
||||
import java.net.HttpURLConnection
|
||||
|
|
|
@ -42,7 +42,7 @@ class InviteUsersToRoomViewModel @AssistedInject constructor(@Assisted
|
|||
private val room = session.getRoom(initialState.roomId)!!
|
||||
|
||||
@AssistedFactory
|
||||
interface Factory: MavericksAssistedViewModelFactory<InviteUsersToRoomViewModel,InviteUsersToRoomViewState> {
|
||||
interface Factory : MavericksAssistedViewModelFactory<InviteUsersToRoomViewModel, InviteUsersToRoomViewState> {
|
||||
override fun create(initialState: InviteUsersToRoomViewState): InviteUsersToRoomViewModel
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,6 @@ import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
|||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.di.ActiveSessionHolder
|
||||
|
||||
import im.vector.app.core.error.ErrorFormatter
|
||||
import im.vector.app.core.platform.VectorBaseActivity
|
||||
import im.vector.app.core.utils.toast
|
||||
|
|
|
@ -20,7 +20,6 @@ import android.content.Context
|
|||
import android.content.Intent
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.annotation.CallSuper
|
||||
import androidx.core.view.ViewCompat
|
||||
import androidx.core.view.children
|
||||
import androidx.core.view.isVisible
|
||||
|
@ -33,7 +32,6 @@ import com.google.android.material.appbar.MaterialToolbar
|
|||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import im.vector.app.R
|
||||
|
||||
import im.vector.app.core.extensions.POP_BACK_STACK_EXCLUSIVE
|
||||
import im.vector.app.core.extensions.addFragment
|
||||
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.Stage
|
||||
import org.matrix.android.sdk.api.extensions.tryOrNull
|
||||
import javax.inject.Inject
|
||||
|
||||
/**
|
||||
* The LoginActivity manages the fragment navigation and also display the loading View
|
||||
|
|
|
@ -18,15 +18,12 @@ package im.vector.app.features.login
|
|||
|
||||
import android.content.Context
|
||||
import android.net.Uri
|
||||
import androidx.fragment.app.FragmentActivity
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.airbnb.mvrx.ActivityViewModelContext
|
||||
import com.airbnb.mvrx.Fail
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedFactory
|
||||
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.resources.StringProvider
|
||||
import im.vector.app.core.utils.ensureTrailingSlash
|
||||
import im.vector.app.features.signout.soft.SoftLogoutActivity
|
||||
import kotlinx.coroutines.Job
|
||||
import kotlinx.coroutines.launch
|
||||
import org.matrix.android.sdk.api.MatrixPatterns.getDomain
|
||||
|
@ -74,7 +70,7 @@ class LoginViewModel @AssistedInject constructor(
|
|||
) : VectorViewModel<LoginViewState, LoginAction, LoginViewEvents>(initialState) {
|
||||
|
||||
@AssistedFactory
|
||||
interface Factory:MavericksAssistedViewModelFactory<LoginViewModel,LoginViewState> {
|
||||
interface Factory : MavericksAssistedViewModelFactory<LoginViewModel, LoginViewState> {
|
||||
override fun create(initialState: LoginViewState): LoginViewModel
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ import android.content.Context
|
|||
import android.content.Intent
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.annotation.CallSuper
|
||||
import androidx.core.view.ViewCompat
|
||||
import androidx.core.view.children
|
||||
import androidx.core.view.isVisible
|
||||
|
@ -32,7 +31,6 @@ import com.google.android.material.appbar.MaterialToolbar
|
|||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import im.vector.app.R
|
||||
|
||||
import im.vector.app.core.extensions.POP_BACK_STACK_EXCLUSIVE
|
||||
import im.vector.app.core.extensions.addFragment
|
||||
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.Stage
|
||||
import org.matrix.android.sdk.api.extensions.tryOrNull
|
||||
import javax.inject.Inject
|
||||
|
||||
/**
|
||||
* The LoginActivity manages the fragment navigation and also display the loading View
|
||||
|
|
|
@ -18,12 +18,9 @@ package im.vector.app.features.login2
|
|||
|
||||
import android.content.Context
|
||||
import android.net.Uri
|
||||
import androidx.fragment.app.FragmentActivity
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.airbnb.mvrx.ActivityViewModelContext
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedFactory
|
||||
import dagger.assisted.AssistedInject
|
||||
|
@ -74,7 +71,7 @@ class LoginViewModel2 @AssistedInject constructor(
|
|||
) : VectorViewModel<LoginViewState2, LoginAction2, LoginViewEvents2>(initialState) {
|
||||
|
||||
@AssistedFactory
|
||||
interface Factory: MavericksAssistedViewModelFactory<LoginViewModel2,LoginViewState2> {
|
||||
interface Factory : MavericksAssistedViewModelFactory<LoginViewModel2, LoginViewState2> {
|
||||
override fun create(initialState: LoginViewState2): LoginViewModel2
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ class AccountCreatedViewModel @AssistedInject constructor(
|
|||
) : VectorViewModel<AccountCreatedViewState, AccountCreatedAction, AccountCreatedViewEvents>(initialState) {
|
||||
|
||||
@AssistedFactory
|
||||
interface Factory: MavericksAssistedViewModelFactory<AccountCreatedViewModel,AccountCreatedViewState> {
|
||||
interface Factory : MavericksAssistedViewModelFactory<AccountCreatedViewModel, AccountCreatedViewState> {
|
||||
override fun create(initialState: AccountCreatedViewState): AccountCreatedViewModel
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,6 @@ import com.airbnb.mvrx.withState
|
|||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import im.vector.app.R
|
||||
|
||||
import im.vector.app.core.extensions.commitTransaction
|
||||
import im.vector.app.core.platform.VectorBaseBottomSheetDialogFragment
|
||||
import im.vector.app.databinding.BottomSheetMatrixToCardBinding
|
||||
|
|
|
@ -53,7 +53,7 @@ class MatrixToBottomSheetViewModel @AssistedInject constructor(
|
|||
VectorViewModel<MatrixToBottomSheetState, MatrixToAction, MatrixToViewEvents>(initialState) {
|
||||
|
||||
@AssistedFactory
|
||||
interface Factory: MavericksAssistedViewModelFactory<MatrixToBottomSheetViewModel,MatrixToBottomSheetState> {
|
||||
interface Factory : MavericksAssistedViewModelFactory<MatrixToBottomSheetViewModel, MatrixToBottomSheetState> {
|
||||
override fun create(initialState: MatrixToBottomSheetState): MatrixToBottomSheetViewModel
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,6 @@ import android.os.Bundle
|
|||
import androidx.core.net.toUri
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import im.vector.app.core.di.ActiveSessionHolder
|
||||
|
||||
import im.vector.app.core.platform.VectorBaseActivity
|
||||
import im.vector.app.databinding.ActivityBigImageViewerBinding
|
||||
import javax.inject.Inject
|
||||
|
|
|
@ -63,7 +63,6 @@ class VectorAttachmentViewerActivity : AttachmentViewerActivity(), BaseAttachmen
|
|||
@Inject
|
||||
lateinit var imageContentRenderer: ImageContentRenderer
|
||||
|
||||
|
||||
private var initialIndex = 0
|
||||
private var isAnimatingOut = false
|
||||
|
||||
|
|
|
@ -25,7 +25,6 @@ import com.google.zxing.Result
|
|||
import com.google.zxing.ResultMetadataType
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import im.vector.app.R
|
||||
|
||||
import im.vector.app.core.extensions.replaceFragment
|
||||
import im.vector.app.core.platform.VectorBaseActivity
|
||||
import im.vector.app.databinding.ActivitySimpleBinding
|
||||
|
|
|
@ -27,12 +27,10 @@ import com.airbnb.mvrx.viewModel
|
|||
import com.airbnb.mvrx.withState
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import im.vector.app.R
|
||||
|
||||
import im.vector.app.core.platform.VectorBaseActivity
|
||||
import im.vector.app.databinding.ActivityBugReportBinding
|
||||
import org.matrix.android.sdk.api.extensions.tryOrNull
|
||||
import timber.log.Timber
|
||||
import javax.inject.Inject
|
||||
|
||||
/**
|
||||
* Form to send a bug report
|
||||
|
|
|
@ -35,7 +35,7 @@ class BugReportViewModel @AssistedInject constructor(
|
|||
) : VectorViewModel<BugReportState, EmptyAction, EmptyViewEvents>(initialState) {
|
||||
|
||||
@AssistedFactory
|
||||
interface Factory: MavericksAssistedViewModelFactory<BugReportViewModel,BugReportState> {
|
||||
interface Factory : MavericksAssistedViewModelFactory<BugReportViewModel, BugReportState> {
|
||||
override fun create(initialState: BugReportState): BugReportViewModel
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,6 @@ package im.vector.app.features.rageshake
|
|||
import android.content.Context
|
||||
import android.hardware.Sensor
|
||||
import android.hardware.SensorManager
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.core.content.getSystemService
|
||||
import androidx.fragment.app.FragmentActivity
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
|
|
|
@ -32,7 +32,6 @@ import com.jakewharton.rxbinding3.widget.queryTextChanges
|
|||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import im.vector.app.EmojiCompatFontProvider
|
||||
import im.vector.app.R
|
||||
|
||||
import im.vector.app.core.extensions.observeEvent
|
||||
import im.vector.app.core.platform.VectorBaseActivity
|
||||
import im.vector.app.databinding.ActivityEmojiReactionPickerBinding
|
||||
|
|
|
@ -39,7 +39,7 @@ class EmojiSearchResultViewModel @AssistedInject constructor(
|
|||
VectorViewModel<EmojiSearchResultViewState, EmojiSearchAction, EmptyViewEvents>(initialState) {
|
||||
|
||||
@AssistedFactory
|
||||
interface Factory: MavericksAssistedViewModelFactory<EmojiSearchResultViewModel,EmojiSearchResultViewState> {
|
||||
interface Factory : MavericksAssistedViewModelFactory<EmojiSearchResultViewModel, EmojiSearchResultViewState> {
|
||||
override fun create(initialState: EmojiSearchResultViewState): EmojiSearchResultViewModel
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
package im.vector.app.features.room
|
||||
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedFactory
|
||||
import dagger.assisted.AssistedInject
|
||||
|
@ -55,7 +54,7 @@ class RequireActiveMembershipViewModel @AssistedInject constructor(
|
|||
VectorViewModel<RequireActiveMembershipViewState, RequireActiveMembershipAction, RequireActiveMembershipViewEvents>(initialState) {
|
||||
|
||||
@AssistedFactory
|
||||
interface Factory: MavericksAssistedViewModelFactory<RequireActiveMembershipViewModel,RequireActiveMembershipViewState> {
|
||||
interface Factory : MavericksAssistedViewModelFactory<RequireActiveMembershipViewModel, RequireActiveMembershipViewState> {
|
||||
override fun create(initialState: RequireActiveMembershipViewState): RequireActiveMembershipViewModel
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,6 @@ import com.airbnb.mvrx.viewModel
|
|||
import com.airbnb.mvrx.withState
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import im.vector.app.R
|
||||
|
||||
import im.vector.app.core.extensions.addFragment
|
||||
import im.vector.app.core.extensions.addFragmentToBackstack
|
||||
import im.vector.app.core.extensions.popBackstack
|
||||
|
|
|
@ -16,12 +16,10 @@
|
|||
|
||||
package im.vector.app.features.roomdirectory
|
||||
|
||||
import com.airbnb.mvrx.ActivityViewModelContext
|
||||
import com.airbnb.mvrx.Fail
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.airbnb.mvrx.appendAt
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedFactory
|
||||
|
@ -51,7 +49,7 @@ class RoomDirectoryViewModel @AssistedInject constructor(
|
|||
) : VectorViewModel<PublicRoomsViewState, RoomDirectoryAction, RoomDirectoryViewEvents>(initialState) {
|
||||
|
||||
@AssistedFactory
|
||||
interface Factory: MavericksAssistedViewModelFactory<RoomDirectoryViewModel,PublicRoomsViewState> {
|
||||
interface Factory : MavericksAssistedViewModelFactory<RoomDirectoryViewModel, PublicRoomsViewState> {
|
||||
override fun create(initialState: PublicRoomsViewState): RoomDirectoryViewModel
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,6 @@ import android.os.Bundle
|
|||
import com.google.android.material.appbar.MaterialToolbar
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import im.vector.app.R
|
||||
|
||||
import im.vector.app.core.extensions.addFragment
|
||||
import im.vector.app.core.platform.ToolbarConfigurable
|
||||
import im.vector.app.core.platform.VectorBaseActivity
|
||||
|
|
|
@ -17,12 +17,10 @@
|
|||
package im.vector.app.features.roomdirectory.picker
|
||||
|
||||
import com.airbnb.mvrx.Fail
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedFactory
|
||||
import dagger.assisted.AssistedInject
|
||||
|
@ -47,7 +45,7 @@ class RoomDirectoryPickerViewModel @AssistedInject constructor(
|
|||
) : VectorViewModel<RoomDirectoryPickerViewState, RoomDirectoryPickerAction, EmptyViewEvents>(initialState) {
|
||||
|
||||
@AssistedFactory
|
||||
interface Factory: MavericksAssistedViewModelFactory<RoomDirectoryPickerViewModel,RoomDirectoryPickerViewState> {
|
||||
interface Factory : MavericksAssistedViewModelFactory<RoomDirectoryPickerViewModel, RoomDirectoryPickerViewState> {
|
||||
override fun create(initialState: RoomDirectoryPickerViewState): RoomDirectoryPickerViewModel
|
||||
}
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ class RoomPreviewViewModel @AssistedInject constructor(@Assisted private val ini
|
|||
VectorViewModel<RoomPreviewViewState, RoomPreviewAction, EmptyViewEvents>(initialState) {
|
||||
|
||||
@AssistedFactory
|
||||
interface Factory: MavericksAssistedViewModelFactory<RoomPreviewViewModel,RoomPreviewViewState> {
|
||||
interface Factory : MavericksAssistedViewModelFactory<RoomPreviewViewModel, RoomPreviewViewState> {
|
||||
override fun create(initialState: RoomPreviewViewState): RoomPreviewViewModel
|
||||
}
|
||||
|
||||
|
|
|
@ -25,15 +25,12 @@ import com.airbnb.mvrx.viewModel
|
|||
import com.google.android.material.appbar.MaterialToolbar
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import im.vector.app.R
|
||||
|
||||
import im.vector.app.core.extensions.addFragment
|
||||
import im.vector.app.core.platform.ToolbarConfigurable
|
||||
import im.vector.app.core.platform.VectorBaseActivity
|
||||
import im.vector.app.databinding.ActivitySimpleBinding
|
||||
import im.vector.app.features.room.RequireActiveMembershipViewEvents
|
||||
import im.vector.app.features.room.RequireActiveMembershipViewModel
|
||||
import im.vector.app.features.room.RequireActiveMembershipViewState
|
||||
import javax.inject.Inject
|
||||
|
||||
@AndroidEntryPoint
|
||||
class RoomMemberProfileActivity :
|
||||
|
|
|
@ -18,12 +18,10 @@
|
|||
package im.vector.app.features.roommemberprofile
|
||||
|
||||
import com.airbnb.mvrx.Fail
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedFactory
|
||||
import dagger.assisted.AssistedInject
|
||||
|
|
|
@ -25,7 +25,6 @@ import com.airbnb.mvrx.viewModel
|
|||
import com.google.android.material.appbar.MaterialToolbar
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import im.vector.app.R
|
||||
|
||||
import im.vector.app.core.extensions.addFragment
|
||||
import im.vector.app.core.extensions.addFragmentToBackstack
|
||||
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.room.RequireActiveMembershipViewEvents
|
||||
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.banned.RoomBannedMemberListFragment
|
||||
import im.vector.app.features.roomprofile.members.RoomMemberListFragment
|
||||
|
|
|
@ -25,7 +25,6 @@ import androidx.recyclerview.widget.RecyclerView
|
|||
import com.airbnb.mvrx.fragmentViewModel
|
||||
import com.airbnb.mvrx.withState
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
|
||||
import im.vector.app.core.extensions.cleanup
|
||||
import im.vector.app.core.extensions.configureWith
|
||||
import im.vector.app.core.platform.VectorBaseBottomSheetDialogFragment
|
||||
|
|
|
@ -35,7 +35,7 @@ class RoomNotificationSettingsViewModel @AssistedInject constructor(
|
|||
) : VectorViewModel<RoomNotificationSettingsViewState, RoomNotificationSettingsAction, RoomNotificationSettingsViewEvents>(initialState) {
|
||||
|
||||
@AssistedFactory
|
||||
interface Factory: MavericksAssistedViewModelFactory<RoomNotificationSettingsViewModel,RoomNotificationSettingsViewState> {
|
||||
interface Factory : MavericksAssistedViewModelFactory<RoomNotificationSettingsViewModel, RoomNotificationSettingsViewState> {
|
||||
override fun create(initialState: RoomNotificationSettingsViewState): RoomNotificationSettingsViewModel
|
||||
}
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ class RoomPermissionsViewModel @AssistedInject constructor(@Assisted initialStat
|
|||
VectorViewModel<RoomPermissionsViewState, RoomPermissionsAction, RoomPermissionsViewEvents>(initialState) {
|
||||
|
||||
@AssistedFactory
|
||||
interface Factory: MavericksAssistedViewModelFactory<RoomPermissionsViewModel,RoomPermissionsViewState> {
|
||||
interface Factory : MavericksAssistedViewModelFactory<RoomPermissionsViewModel, RoomPermissionsViewState> {
|
||||
override fun create(initialState: RoomPermissionsViewState): RoomPermissionsViewModel
|
||||
}
|
||||
|
||||
|
|
|
@ -17,10 +17,7 @@
|
|||
package im.vector.app.features.roomprofile.settings
|
||||
|
||||
import androidx.core.net.toFile
|
||||
import com.airbnb.mvrx.ActivityViewModelContext
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedFactory
|
||||
import dagger.assisted.AssistedInject
|
||||
|
|
|
@ -22,7 +22,6 @@ import android.view.View
|
|||
import com.airbnb.mvrx.fragmentViewModel
|
||||
import com.airbnb.mvrx.withState
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
|
||||
import im.vector.app.core.ui.bottomsheet.BottomSheetGeneric
|
||||
import im.vector.app.core.ui.bottomsheet.BottomSheetGenericController
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
|
|
@ -29,7 +29,6 @@ import com.airbnb.mvrx.viewModel
|
|||
import com.airbnb.mvrx.withState
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import im.vector.app.R
|
||||
|
||||
import im.vector.app.core.error.ErrorFormatter
|
||||
import im.vector.app.core.extensions.addFragment
|
||||
import im.vector.app.core.extensions.commitTransaction
|
||||
|
|
|
@ -22,7 +22,6 @@ import android.view.View
|
|||
import com.airbnb.mvrx.fragmentViewModel
|
||||
import com.airbnb.mvrx.withState
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
|
||||
import im.vector.app.core.ui.bottomsheet.BottomSheetGeneric
|
||||
import im.vector.app.core.ui.bottomsheet.BottomSheetGenericController
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
|
|
@ -18,14 +18,11 @@ package im.vector.app.features.roomprofile.settings.joinrule.advanced
|
|||
|
||||
import android.graphics.Typeface
|
||||
import androidx.core.text.toSpannable
|
||||
import com.airbnb.mvrx.ActivityViewModelContext
|
||||
import com.airbnb.mvrx.Fail
|
||||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MavericksViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedFactory
|
||||
import dagger.assisted.AssistedInject
|
||||
|
|
|
@ -39,7 +39,7 @@ class RoomUploadsViewModel @AssistedInject constructor(
|
|||
) : VectorViewModel<RoomUploadsViewState, RoomUploadsAction, RoomUploadsViewEvents>(initialState) {
|
||||
|
||||
@AssistedFactory
|
||||
interface Factory: MavericksAssistedViewModelFactory<RoomUploadsViewModel,RoomUploadsViewState> {
|
||||
interface Factory : MavericksAssistedViewModelFactory<RoomUploadsViewModel, RoomUploadsViewState> {
|
||||
override fun create(initialState: RoomUploadsViewState): RoomUploadsViewModel
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,6 @@ import androidx.preference.Preference
|
|||
import androidx.preference.PreferenceFragmentCompat
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import im.vector.app.R
|
||||
|
||||
import im.vector.app.core.extensions.replaceFragment
|
||||
import im.vector.app.core.platform.VectorBaseActivity
|
||||
import im.vector.app.databinding.ActivityVectorSettingsBinding
|
||||
|
|
|
@ -48,7 +48,7 @@ class DeactivateAccountViewModel @AssistedInject constructor(@Assisted private v
|
|||
VectorViewModel<DeactivateAccountViewState, DeactivateAccountAction, DeactivateAccountViewEvents>(initialState) {
|
||||
|
||||
@AssistedFactory
|
||||
interface Factory: MavericksAssistedViewModelFactory<DeactivateAccountViewModel, DeactivateAccountViewState> {
|
||||
interface Factory : MavericksAssistedViewModelFactory<DeactivateAccountViewModel, DeactivateAccountViewState> {
|
||||
override fun create(initialState: DeactivateAccountViewState): DeactivateAccountViewModel
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,6 @@ import com.airbnb.mvrx.fragmentViewModel
|
|||
import com.airbnb.mvrx.parentFragmentViewModel
|
||||
import com.airbnb.mvrx.withState
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
|
||||
import im.vector.app.core.extensions.cleanup
|
||||
import im.vector.app.core.extensions.configureWith
|
||||
import im.vector.app.core.platform.VectorBaseBottomSheetDialogFragment
|
||||
|
|
|
@ -35,11 +35,12 @@ class DeviceVerificationInfoBottomSheetViewModel @AssistedInject constructor(@As
|
|||
) : VectorViewModel<DeviceVerificationInfoBottomSheetViewState, EmptyAction, EmptyViewEvents>(initialState) {
|
||||
|
||||
@AssistedFactory
|
||||
interface Factory: MavericksAssistedViewModelFactory<DeviceVerificationInfoBottomSheetViewModel,DeviceVerificationInfoBottomSheetViewState> {
|
||||
interface Factory : MavericksAssistedViewModelFactory<DeviceVerificationInfoBottomSheetViewModel, DeviceVerificationInfoBottomSheetViewState> {
|
||||
override fun create(initialState: DeviceVerificationInfoBottomSheetViewState): DeviceVerificationInfoBottomSheetViewModel
|
||||
}
|
||||
|
||||
companion object : MavericksViewModelFactory<DeviceVerificationInfoBottomSheetViewModel, DeviceVerificationInfoBottomSheetViewState> by hiltMavericksViewModelFactory()
|
||||
companion object : MavericksViewModelFactory<DeviceVerificationInfoBottomSheetViewModel, DeviceVerificationInfoBottomSheetViewState>
|
||||
by hiltMavericksViewModelFactory()
|
||||
|
||||
init {
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ class DevicesViewModel @AssistedInject constructor(
|
|||
var pendingAuth: UIABaseAuth? = null
|
||||
|
||||
@AssistedFactory
|
||||
interface Factory: MavericksAssistedViewModelFactory<DevicesViewModel,DevicesViewState> {
|
||||
interface Factory : MavericksAssistedViewModelFactory<DevicesViewModel, DevicesViewState> {
|
||||
override fun create(initialState: DevicesViewState): DevicesViewModel
|
||||
}
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue