mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-12-28 02:20:10 +01:00
Code review
This commit is contained in:
parent
7c0137e2dc
commit
f5dc0b38ff
@ -52,8 +52,10 @@ import im.vector.matrix.android.internal.crypto.keysbackup.model.rest.KeysVersio
|
|||||||
import im.vector.matrix.android.internal.crypto.keysbackup.util.computeRecoveryKey
|
import im.vector.matrix.android.internal.crypto.keysbackup.util.computeRecoveryKey
|
||||||
import im.vector.matrix.android.internal.crypto.model.ImportRoomKeysResult
|
import im.vector.matrix.android.internal.crypto.model.ImportRoomKeysResult
|
||||||
import im.vector.matrix.android.internal.util.awaitCallback
|
import im.vector.matrix.android.internal.util.awaitCallback
|
||||||
|
import im.vector.riotx.R
|
||||||
import im.vector.riotx.core.extensions.exhaustive
|
import im.vector.riotx.core.extensions.exhaustive
|
||||||
import im.vector.riotx.core.platform.VectorViewModel
|
import im.vector.riotx.core.platform.VectorViewModel
|
||||||
|
import im.vector.riotx.core.resources.StringProvider
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
import timber.log.Timber
|
import timber.log.Timber
|
||||||
|
|
||||||
@ -78,7 +80,8 @@ class VerificationBottomSheetViewModel @AssistedInject constructor(
|
|||||||
@Assisted initialState: VerificationBottomSheetViewState,
|
@Assisted initialState: VerificationBottomSheetViewState,
|
||||||
@Assisted val args: VerificationBottomSheet.VerificationArgs,
|
@Assisted val args: VerificationBottomSheet.VerificationArgs,
|
||||||
private val session: Session,
|
private val session: Session,
|
||||||
private val supportedVerificationMethodsProvider: SupportedVerificationMethodsProvider)
|
private val supportedVerificationMethodsProvider: SupportedVerificationMethodsProvider,
|
||||||
|
private val stringProvider: StringProvider)
|
||||||
: VectorViewModel<VerificationBottomSheetViewState, VerificationAction, VerificationBottomSheetViewEvents>(initialState),
|
: VectorViewModel<VerificationBottomSheetViewState, VerificationAction, VerificationBottomSheetViewEvents>(initialState),
|
||||||
VerificationService.Listener {
|
VerificationService.Listener {
|
||||||
|
|
||||||
@ -373,7 +376,7 @@ class VerificationBottomSheetViewModel @AssistedInject constructor(
|
|||||||
// try to get keybackup key
|
// try to get keybackup key
|
||||||
} else {
|
} else {
|
||||||
// POP UP something
|
// POP UP something
|
||||||
_viewEvents.post(VerificationBottomSheetViewEvents.ModalError("Failed to import keys"))
|
_viewEvents.post(VerificationBottomSheetViewEvents.ModalError(stringProvider.getString(R.string.error_failed_to_import_keys)))
|
||||||
}
|
}
|
||||||
|
|
||||||
// try the keybackup
|
// try the keybackup
|
||||||
|
@ -94,6 +94,8 @@
|
|||||||
<string name="encryption_unknown_algorithm_tile_description">The encryption used by this room is not supported</string>
|
<string name="encryption_unknown_algorithm_tile_description">The encryption used by this room is not supported</string>
|
||||||
|
|
||||||
<string name="room_created_summary_item">%s created and configured the room.</string>
|
<string name="room_created_summary_item">%s created and configured the room.</string>
|
||||||
|
<string name="error_failed_to_import_keys">Failed to import keys</string>
|
||||||
|
|
||||||
<!-- END Strings added by Valere -->
|
<!-- END Strings added by Valere -->
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user