mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-09-28 07:51:42 +01:00
Event driven opt-in.
This commit is contained in:
@@ -21,7 +21,7 @@ import org.thoughtcrime.securesms.groups.GroupId
|
||||
|
||||
private val TAG = Log.tag(AvatarPickerViewModel::class.java)
|
||||
|
||||
sealed class AvatarPickerViewModel : EventDrivenViewModel<AvatarPickerEvents>(TAG) {
|
||||
sealed class AvatarPickerViewModel : EventDrivenViewModel<AvatarPickerEvents>(TAG, shouldLogEvents = false) {
|
||||
|
||||
private val internalState = MutableStateFlow(AvatarPickerState())
|
||||
val state: StateFlow<AvatarPickerState> = internalState
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ import org.thoughtcrime.securesms.components.settings.app.account.signallogin.Si
|
||||
class MessageBackupsSignalLoginDetailsViewModel(
|
||||
repository: SignalLoginViewDetailsRepository = SignalLoginViewDetailsRepository(),
|
||||
isPasswordManagerAvailable: Boolean = true
|
||||
) : EventDrivenViewModel<SignalLoginViewDetailsScreenEvents>(TAG) {
|
||||
) : EventDrivenViewModel<SignalLoginViewDetailsScreenEvents>(TAG, shouldLogEvents = true) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(MessageBackupsSignalLoginDetailsViewModel::class)
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.util.TimeZone
|
||||
class ClockSkewViewModel(
|
||||
private val clock: () -> Long = { System.currentTimeMillis() },
|
||||
detected: StateFlow<Boolean> = ClockSkewDetector.detected
|
||||
) : EventDrivenViewModel<ClockSkewScreenEvent>(TAG) {
|
||||
) : EventDrivenViewModel<ClockSkewScreenEvent>(TAG, shouldLogEvents = true) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(ClockSkewViewModel::class)
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ import org.thoughtcrime.securesms.lock.v2.SvrConstants
|
||||
*/
|
||||
class AccountSettingsViewModel(
|
||||
private val repository: AccountSettingsRepository = AccountSettingsRepository()
|
||||
) : EventDrivenViewModel<AccountSettingsEvent>(TAG) {
|
||||
) : EventDrivenViewModel<AccountSettingsEvent>(TAG, shouldLogEvents = true) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(AccountSettingsViewModel::class)
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ import org.thoughtcrime.securesms.linkdevice.LinkDeviceRepository
|
||||
class LinkedDeviceAccountSettingsViewModel(
|
||||
private val selfDeviceId: () -> Int = { SignalStore.account.deviceId },
|
||||
private val removeDevice: suspend (Int) -> Boolean = LinkDeviceRepository::removeDevice
|
||||
) : EventDrivenViewModel<LinkedDeviceAccountSettingsEvent>(TAG) {
|
||||
) : EventDrivenViewModel<LinkedDeviceAccountSettingsEvent>(TAG, shouldLogEvents = true) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(LinkedDeviceAccountSettingsViewModel::class)
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ import org.signal.uicomponents.codeentryfield.CodeEntryFieldPresenter
|
||||
*/
|
||||
class TotpCodeEntryViewModel(
|
||||
private val repository: TotpRepository = TotpRepository()
|
||||
) : EventDrivenViewModel<TotpCodeEntryEvent>(TAG) {
|
||||
) : EventDrivenViewModel<TotpCodeEntryEvent>(TAG, shouldLogEvents = true) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(TotpCodeEntryViewModel::class)
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ class TotpNameEntryViewModel(
|
||||
private val appId: Long,
|
||||
private val renamedApp: TotpApp? = null,
|
||||
private val repository: TotpRepository = TotpRepository()
|
||||
) : EventDrivenViewModel<TotpNameEntryEvent>(TAG) {
|
||||
) : EventDrivenViewModel<TotpNameEntryEvent>(TAG, shouldLogEvents = true) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(TotpNameEntryViewModel::class)
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ import java.time.format.DateTimeFormatter
|
||||
class TotpSetupViewModel(
|
||||
private val repository: TotpRepository = TotpRepository(),
|
||||
private val accountName: String = accountNameFor(LocalDateTime.now())
|
||||
) : EventDrivenViewModel<TotpSetupEvent>(TAG) {
|
||||
) : EventDrivenViewModel<TotpSetupEvent>(TAG, shouldLogEvents = true) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(TotpSetupViewModel::class)
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ class SettingsSignalLoginDetailsViewModel(
|
||||
private val repository: SignalLoginViewDetailsRepository = SignalLoginViewDetailsRepository(),
|
||||
showResetRecoveryKeyButton: Boolean = false,
|
||||
isPasswordManagerAvailable: Boolean = true
|
||||
) : EventDrivenViewModel<SettingsSignalLoginDetailsEvent>(TAG) {
|
||||
) : EventDrivenViewModel<SettingsSignalLoginDetailsEvent>(TAG, shouldLogEvents = true) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(SettingsSignalLoginDetailsViewModel::class)
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ import org.thoughtcrime.securesms.recipients.Recipient
|
||||
import org.thoughtcrime.securesms.recipients.RecipientId
|
||||
import org.thoughtcrime.securesms.storage.StorageSyncHelper
|
||||
|
||||
class MutedNotificationsViewModel(private val recipientId: RecipientId? = null) : EventDrivenViewModel<MutedNotificationsEvent>(TAG) {
|
||||
class MutedNotificationsViewModel(private val recipientId: RecipientId? = null) : EventDrivenViewModel<MutedNotificationsEvent>(TAG, shouldLogEvents = true) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(MutedNotificationsViewModel::class)
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ class GroupSettingsViewModel(
|
||||
private val groupId: GroupId,
|
||||
private val callMessageIds: LongArray,
|
||||
private val repository: ConversationSettingsRepository
|
||||
) : EventDrivenViewModel<GroupSettingsEvent>(TAG) {
|
||||
) : EventDrivenViewModel<GroupSettingsEvent>(TAG, shouldLogEvents = true) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(GroupSettingsViewModel::class)
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ import org.thoughtcrime.securesms.groups.ui.GroupErrors
|
||||
class GroupPermissionsViewModel(
|
||||
private val groupId: GroupId,
|
||||
private val repository: GroupPermissionsRepository = GroupPermissionsRepository()
|
||||
) : EventDrivenViewModel<GroupPermissionsEvents>(TAG) {
|
||||
) : EventDrivenViewModel<GroupPermissionsEvents>(TAG, shouldLogEvents = true) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(GroupPermissionsViewModel::class)
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ class IndividualSettingsViewModel(
|
||||
private val kind: ConversationSettingsKind,
|
||||
private val callMessageIds: LongArray,
|
||||
private val repository: ConversationSettingsRepository
|
||||
) : EventDrivenViewModel<IndividualSettingsEvent>(TAG) {
|
||||
) : EventDrivenViewModel<IndividualSettingsEvent>(TAG, shouldLogEvents = true) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(IndividualSettingsViewModel::class)
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ import org.thoughtcrime.securesms.recipients.RecipientId
|
||||
|
||||
class CustomNotificationsSettingsViewModel(
|
||||
private val recipientId: RecipientId
|
||||
) : EventDrivenViewModel<CustomNotificationsEvents>(TAG), RecipientForeverObserver {
|
||||
) : EventDrivenViewModel<CustomNotificationsEvents>(TAG, shouldLogEvents = true), RecipientForeverObserver {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(CustomNotificationsSettingsViewModel::class)
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ import org.thoughtcrime.securesms.recipients.RecipientId
|
||||
class SharedContactDetailsViewModel(
|
||||
private val contact: Contact,
|
||||
private val repository: SharedContactDetailsRepository
|
||||
) : EventDrivenViewModel<SharedContactDetailsEvent>(TAG) {
|
||||
) : EventDrivenViewModel<SharedContactDetailsEvent>(TAG, shouldLogEvents = true) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(SharedContactDetailsViewModel::class)
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ import org.signal.core.util.logging.Log
|
||||
|
||||
class EditContactNameViewModel(
|
||||
private val savedState: SavedStateHandle
|
||||
) : EventDrivenViewModel<EditContactNameEvent>(TAG) {
|
||||
) : EventDrivenViewModel<EditContactNameEvent>(TAG, shouldLogEvents = true) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(EditContactNameViewModel::class)
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ import org.thoughtcrime.securesms.contactshare.screens.selectcontact.SelectConta
|
||||
class SelectContactViewModel(
|
||||
private val source: ContactIndexSource,
|
||||
private val savedState: SavedStateHandle = SavedStateHandle()
|
||||
) : EventDrivenViewModel<SelectContactEvent>(TAG) {
|
||||
) : EventDrivenViewModel<SelectContactEvent>(TAG, shouldLogEvents = true) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(SelectContactViewModel::class)
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@ class ShareContactViewModel(
|
||||
private val recipientId: RecipientId?,
|
||||
private val repository: ShareContactRepository,
|
||||
private val savedState: SavedStateHandle
|
||||
) : EventDrivenViewModel<ShareContactEvent>(TAG) {
|
||||
) : EventDrivenViewModel<ShareContactEvent>(TAG, shouldLogEvents = true) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(ShareContactViewModel::class)
|
||||
|
||||
@@ -29,7 +29,7 @@ import org.signal.core.util.logging.Log
|
||||
*/
|
||||
class DeleteAccountViewModel(
|
||||
private val repository: DeleteAccountRepository = DeleteAccountRepository()
|
||||
) : EventDrivenViewModel<DeleteAccountEvent>(TAG) {
|
||||
) : EventDrivenViewModel<DeleteAccountEvent>(TAG, shouldLogEvents = true) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(DeleteAccountViewModel::class)
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ import kotlin.coroutines.resume
|
||||
|
||||
class StickerPackPreviewViewModelV2(
|
||||
private val params: StickerPackParams?
|
||||
) : EventDrivenViewModel<StickerPackPreviewEvent>(TAG) {
|
||||
) : EventDrivenViewModel<StickerPackPreviewEvent>(TAG, shouldLogEvents = true) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(StickerPackPreviewViewModelV2::class)
|
||||
|
||||
@@ -18,7 +18,7 @@ import org.signal.core.util.logging.Log
|
||||
*/
|
||||
abstract class EventDrivenViewModel<E : Any>(
|
||||
private val tag: String,
|
||||
private val shouldLogEvents: Boolean = true
|
||||
private val shouldLogEvents: Boolean = false
|
||||
) : ViewModel() {
|
||||
|
||||
private val eventChannel = Channel<E>(Channel.UNLIMITED)
|
||||
|
||||
@@ -18,7 +18,7 @@ import org.signal.core.util.logging.Log
|
||||
* Owns the navigation. Every event here is answered by a one-liner into [ListDetailNavigator], which is
|
||||
* the point: you keep your screens' rules, and it keeps the stacks, the pane anchor, and the saved state.
|
||||
*/
|
||||
class DemoViewModel(savedStateHandle: SavedStateHandle) : EventDrivenViewModel<DemoEvents>(TAG) {
|
||||
class DemoViewModel(savedStateHandle: SavedStateHandle) : EventDrivenViewModel<DemoEvents>(TAG, shouldLogEvents = true) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(DemoViewModel::class)
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ internal class MediaCaptureViewModel(
|
||||
private val parentEventEmitter: (MediaSendFlowEvent) -> Unit,
|
||||
selectedCaptureScreen: MediaSendRoute.Capture,
|
||||
private val repository: MediaCaptureRepository = MediaCaptureRepository()
|
||||
) : EventDrivenViewModel<MediaCaptureScreenEvents>(TAG) {
|
||||
) : EventDrivenViewModel<MediaCaptureScreenEvents>(TAG, shouldLogEvents = true) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(MediaCaptureViewModel::class)
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ internal class MediaEditViewModel(
|
||||
parentState: StateFlow<MediaSendFlowState>,
|
||||
private val parentEventEmitter: (MediaSendFlowEvent) -> Unit,
|
||||
private val repository: MediaSendRepository = MediaSendDependencies.mediaSendRepository
|
||||
) : EventDrivenViewModel<MediaEditScreenEvents>(TAG) {
|
||||
) : EventDrivenViewModel<MediaEditScreenEvents>(TAG, shouldLogEvents = false) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(MediaEditViewModel::class)
|
||||
|
||||
+1
-1
@@ -44,7 +44,7 @@ internal class MediaSelectViewModel(
|
||||
/** Passed straight through: the rail follows it, and nothing about it is this screen's to decide. */
|
||||
val selectionAdditions: Flow<Media>,
|
||||
private val repository: MediaSendRepository = MediaSendDependencies.mediaSendRepository
|
||||
) : EventDrivenViewModel<MediaSelectScreenEvents>(TAG) {
|
||||
) : EventDrivenViewModel<MediaSelectScreenEvents>(TAG, shouldLogEvents = false) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(MediaSelectViewModel::class)
|
||||
|
||||
@@ -31,7 +31,7 @@ class RegistrationViewModel(
|
||||
private val savedStateHandle: SavedStateHandle,
|
||||
startDestination: RegistrationRoute? = null,
|
||||
private val startFresh: Boolean = false
|
||||
) : EventDrivenViewModel<RegistrationFlowEvent>(TAG) {
|
||||
) : EventDrivenViewModel<RegistrationFlowEvent>(TAG, shouldLogEvents = false) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(RegistrationViewModel::class)
|
||||
|
||||
+1
-1
@@ -44,7 +44,7 @@ import kotlin.time.Duration.Companion.milliseconds
|
||||
class AddUsernameViewModel(
|
||||
private val repository: RegistrationRepository,
|
||||
private val parentEventEmitter: (RegistrationFlowEvent) -> Unit
|
||||
) : EventDrivenViewModel<AddUsernameScreenEvents>(TAG) {
|
||||
) : EventDrivenViewModel<AddUsernameScreenEvents>(TAG, shouldLogEvents = true) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(AddUsernameViewModel::class)
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@ class EnterAepForLocalBackupViewModel(
|
||||
private val resultBus: ResultEventBus,
|
||||
private val resultKey: String,
|
||||
isPasswordManagerAvailable: Boolean = false
|
||||
) : EventDrivenViewModel<EnterAepEvents>(TAG) {
|
||||
) : EventDrivenViewModel<EnterAepEvents>(TAG, shouldLogEvents = true) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(EnterAepForLocalBackupViewModel::class)
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ class EnterAepForRemoteBackupPostRegistrationViewModel(
|
||||
private val repository: RegistrationRepository,
|
||||
private val parentEventEmitter: (RegistrationFlowEvent) -> Unit,
|
||||
isPasswordManagerAvailable: Boolean = false
|
||||
) : EventDrivenViewModel<EnterAepEvents>(TAG) {
|
||||
) : EventDrivenViewModel<EnterAepEvents>(TAG, shouldLogEvents = true) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(EnterAepForRemoteBackupPostRegistrationViewModel::class)
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ class EnterAepForRemoteBackupPreRegistrationViewModel(
|
||||
private val repository: RegistrationRepository,
|
||||
private val parentEventEmitter: (RegistrationFlowEvent) -> Unit,
|
||||
isPasswordManagerAvailable: Boolean = false
|
||||
) : EventDrivenViewModel<EnterAepEvents>(TAG) {
|
||||
) : EventDrivenViewModel<EnterAepEvents>(TAG, shouldLogEvents = true) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(EnterAepForRemoteBackupPreRegistrationViewModel::class)
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ class CountryCodePickerViewModel(
|
||||
private val resultBus: ResultEventBus,
|
||||
private val resultKey: String,
|
||||
initialCountry: Country? = null
|
||||
) : EventDrivenViewModel<CountryCodePickerScreenEvents>(TAG) {
|
||||
) : EventDrivenViewModel<CountryCodePickerScreenEvents>(TAG, shouldLogEvents = true) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(CountryCodePickerViewModel::class)
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ import org.signal.registration.screens.util.navigateTo
|
||||
class CreateProfileViewModel(
|
||||
private val repository: RegistrationRepository,
|
||||
private val parentEventEmitter: (RegistrationFlowEvent) -> Unit
|
||||
) : EventDrivenViewModel<CreateProfileScreenEvents>(TAG) {
|
||||
) : EventDrivenViewModel<CreateProfileScreenEvents>(TAG, shouldLogEvents = true) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(CreateProfileViewModel::class)
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ import org.signal.registration.RestoreDecision
|
||||
class DeviceTransferCompleteViewModel(
|
||||
private val repository: RegistrationRepository,
|
||||
private val parentEventEmitter: (RegistrationFlowEvent) -> Unit
|
||||
) : EventDrivenViewModel<DeviceTransferCompleteScreenEvents>(TAG) {
|
||||
) : EventDrivenViewModel<DeviceTransferCompleteScreenEvents>(TAG, shouldLogEvents = true) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(DeviceTransferCompleteViewModel::class)
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ import org.signal.registration.screens.util.navigateTo
|
||||
|
||||
class DeviceTransferInstructionsViewModel(
|
||||
private val parentEventEmitter: (RegistrationFlowEvent) -> Unit
|
||||
) : EventDrivenViewModel<DeviceTransferInstructionsScreenEvents>(TAG) {
|
||||
) : EventDrivenViewModel<DeviceTransferInstructionsScreenEvents>(TAG, shouldLogEvents = true) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(DeviceTransferInstructionsViewModel::class)
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ class DeviceTransferProgressViewModel(
|
||||
private val context: Context,
|
||||
private val progressEvents: Flow<NewDeviceRestoreStatus>,
|
||||
private val parentEventEmitter: (RegistrationFlowEvent) -> Unit
|
||||
) : EventDrivenViewModel<DeviceTransferProgressScreenEvents>(TAG) {
|
||||
) : EventDrivenViewModel<DeviceTransferProgressScreenEvents>(TAG, shouldLogEvents = true) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(DeviceTransferProgressViewModel::class)
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ class DeviceTransferSetupViewModel(
|
||||
private val setupEvents: Flow<TransferStatus>,
|
||||
private val parentState: StateFlow<RegistrationFlowState>,
|
||||
private val parentEventEmitter: (RegistrationFlowEvent) -> Unit
|
||||
) : EventDrivenViewModel<DeviceTransferSetupScreenEvents>(TAG) {
|
||||
) : EventDrivenViewModel<DeviceTransferSetupScreenEvents>(TAG, shouldLogEvents = true) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(DeviceTransferSetupViewModel::class)
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ class PhoneNumberDiscoverabilityViewModel(
|
||||
private val parentEventEmitter: (RegistrationFlowEvent) -> Unit,
|
||||
private val resultBus: ResultEventBus,
|
||||
private val resultKey: String
|
||||
) : EventDrivenViewModel<PhoneNumberDiscoverabilityScreenEvents>(TAG) {
|
||||
) : EventDrivenViewModel<PhoneNumberDiscoverabilityScreenEvents>(TAG, shouldLogEvents = true) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(PhoneNumberDiscoverabilityViewModel::class)
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ class LinkAccountViewModel(
|
||||
private val parentState: StateFlow<RegistrationFlowState>,
|
||||
private val parentEventEmitter: (RegistrationFlowEvent) -> Unit,
|
||||
showCreateAccount: Boolean = true
|
||||
) : EventDrivenViewModel<LinkAccountScreenEvent>(TAG) {
|
||||
) : EventDrivenViewModel<LinkAccountScreenEvent>(TAG, shouldLogEvents = true) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(LinkAccountViewModel::class)
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ class LocalBackupRestoreViewModel(
|
||||
private val resultBus: ResultEventBus,
|
||||
private val resultKey: String,
|
||||
private val knownAep: AccountEntropyPool? = null
|
||||
) : EventDrivenViewModel<LocalBackupRestoreEvents>(TAG) {
|
||||
) : EventDrivenViewModel<LocalBackupRestoreEvents>(TAG, shouldLogEvents = false) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(LocalBackupRestoreViewModel::class)
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ class MessageSyncViewModel(
|
||||
private val repository: RegistrationRepository,
|
||||
private val parentState: StateFlow<RegistrationFlowState>,
|
||||
private val parentEventEmitter: (RegistrationFlowEvent) -> Unit
|
||||
) : EventDrivenViewModel<MessageSyncScreenEvent>(TAG) {
|
||||
) : EventDrivenViewModel<MessageSyncScreenEvent>(TAG, shouldLogEvents = true) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(MessageSyncViewModel::class)
|
||||
|
||||
+1
-1
@@ -47,7 +47,7 @@ class PhoneNumberEntryViewModel(
|
||||
private val parentState: StateFlow<RegistrationFlowState>,
|
||||
private val parentEventEmitter: (RegistrationFlowEvent) -> Unit,
|
||||
private val clock: () -> Long = { System.currentTimeMillis() }
|
||||
) : EventDrivenViewModel<PhoneNumberEntryScreenEvents>(TAG) {
|
||||
) : EventDrivenViewModel<PhoneNumberEntryScreenEvents>(TAG, shouldLogEvents = false) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(PhoneNumberEntryViewModel::class)
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ class PinCreationViewModel(
|
||||
private val repository: RegistrationRepository,
|
||||
parentState: StateFlow<RegistrationFlowState>,
|
||||
private val parentEventEmitter: (RegistrationFlowEvent) -> Unit
|
||||
) : EventDrivenViewModel<PinCreationScreenEvents>(TAG) {
|
||||
) : EventDrivenViewModel<PinCreationScreenEvents>(TAG, shouldLogEvents = false) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(PinCreationViewModel::class)
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ class PinEntryForRegistrationLockViewModel(
|
||||
private val parentEventEmitter: (RegistrationFlowEvent) -> Unit,
|
||||
private val timeRemaining: Long,
|
||||
private val svrCredentials: SvrCredentials
|
||||
) : EventDrivenViewModel<PinEntryScreenEvents>(TAG) {
|
||||
) : EventDrivenViewModel<PinEntryScreenEvents>(TAG, shouldLogEvents = false) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(PinEntryForRegistrationLockViewModel::class)
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ class PinEntryForSmsBypassViewModel(
|
||||
private val parentState: StateFlow<RegistrationFlowState>,
|
||||
private val parentEventEmitter: (RegistrationFlowEvent) -> Unit,
|
||||
private val svrCredentials: SvrCredentials
|
||||
) : EventDrivenViewModel<PinEntryScreenEvents>(TAG) {
|
||||
) : EventDrivenViewModel<PinEntryScreenEvents>(TAG, shouldLogEvents = false) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(PinEntryForSmsBypassViewModel::class)
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ class PinEntryForSvrRestoreViewModel(
|
||||
private val repository: RegistrationRepository,
|
||||
private val parentState: StateFlow<RegistrationFlowState>,
|
||||
private val parentEventEmitter: (RegistrationFlowEvent) -> Unit
|
||||
) : EventDrivenViewModel<PinEntryScreenEvents>(TAG) {
|
||||
) : EventDrivenViewModel<PinEntryScreenEvents>(TAG, shouldLogEvents = false) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(PinEntryForSvrRestoreViewModel::class)
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ import org.signal.registration.screens.util.navigateTo
|
||||
class QuickRestoreQrViewModel(
|
||||
private val repository: RegistrationRepository,
|
||||
private val parentEventEmitter: (RegistrationFlowEvent) -> Unit
|
||||
) : EventDrivenViewModel<QuickRestoreQrEvents>(TAG) {
|
||||
) : EventDrivenViewModel<QuickRestoreQrEvents>(TAG, shouldLogEvents = true) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(QuickRestoreQrViewModel::class)
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ class RemoteBackupRestoreViewModel(
|
||||
private val parentState: StateFlow<RegistrationFlowState>,
|
||||
private val parentEventEmitter: (RegistrationFlowEvent) -> Unit,
|
||||
private val ioDispatcher: CoroutineContext = Dispatchers.IO
|
||||
) : EventDrivenViewModel<RemoteBackupRestoreScreenEvents>(TAG) {
|
||||
) : EventDrivenViewModel<RemoteBackupRestoreScreenEvents>(TAG, shouldLogEvents = true) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(RemoteBackupRestoreViewModel::class)
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ class ArchiveRestoreSelectionViewModel(
|
||||
parentState: StateFlow<RegistrationFlowState>,
|
||||
private val parentEventEmitter: (RegistrationFlowEvent) -> Unit,
|
||||
private val knownAep: AccountEntropyPool? = null
|
||||
) : EventDrivenViewModel<ArchiveRestoreSelectionScreenEvents>(TAG) {
|
||||
) : EventDrivenViewModel<ArchiveRestoreSelectionScreenEvents>(TAG, shouldLogEvents = false) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(ArchiveRestoreSelectionViewModel::class)
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ import org.signal.registration.ContactSupportController
|
||||
*/
|
||||
class ContactSupportViewModel(
|
||||
private val controller: ContactSupportController
|
||||
) : EventDrivenViewModel<ContactSupportEvents>(TAG) {
|
||||
) : EventDrivenViewModel<ContactSupportEvents>(TAG, shouldLogEvents = true) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(ContactSupportViewModel::class)
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@ class SignalLoginCredentialEntryViewModel(
|
||||
private val repository: RegistrationRepository,
|
||||
private val parentEventEmitter: (RegistrationFlowEvent) -> Unit,
|
||||
prefilledAccountId: String? = null
|
||||
) : EventDrivenViewModel<SignalLoginCredentialEntryScreenEvents>(TAG) {
|
||||
) : EventDrivenViewModel<SignalLoginCredentialEntryScreenEvents>(TAG, shouldLogEvents = true) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(SignalLoginCredentialEntryViewModel::class)
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ import org.signal.registration.screens.util.navigateTo
|
||||
class SignalLoginManualSaveConfirmationViewModel(
|
||||
private val parentState: StateFlow<RegistrationFlowState>,
|
||||
private val parentEventEmitter: (RegistrationFlowEvent) -> Unit
|
||||
) : EventDrivenViewModel<SignalLoginCredentialEntryScreenEvents>(TAG) {
|
||||
) : EventDrivenViewModel<SignalLoginCredentialEntryScreenEvents>(TAG, shouldLogEvents = true) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(SignalLoginManualSaveConfirmationViewModel::class)
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ import org.signal.signallogin.viewdetails.SignalLoginViewDetailsState
|
||||
class RegistrationSignalLoginDetailsViewModel(
|
||||
parentState: StateFlow<RegistrationFlowState>,
|
||||
private val parentEventEmitter: (RegistrationFlowEvent) -> Unit
|
||||
) : EventDrivenViewModel<SignalLoginViewDetailsScreenEvents>(TAG) {
|
||||
) : EventDrivenViewModel<SignalLoginViewDetailsScreenEvents>(TAG, shouldLogEvents = true) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(RegistrationSignalLoginDetailsViewModel::class)
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ class SignalLoginInfoViewModel(
|
||||
parentState: StateFlow<RegistrationFlowState>,
|
||||
private val parentEventEmitter: (RegistrationFlowEvent) -> Unit,
|
||||
isPasswordManagerAvailable: Boolean
|
||||
) : EventDrivenViewModel<SignalLoginInfoScreenEvents>(TAG) {
|
||||
) : EventDrivenViewModel<SignalLoginInfoScreenEvents>(TAG, shouldLogEvents = false) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(SignalLoginInfoViewModel::class)
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ import org.signal.registration.screens.util.navigateTo
|
||||
class SignalLoginViewDetailsForManualSaveViewModel(
|
||||
parentState: StateFlow<RegistrationFlowState>,
|
||||
private val parentEventEmitter: (RegistrationFlowEvent) -> Unit
|
||||
) : EventDrivenViewModel<SignalLoginViewDetailsForManualSaveScreenEvents>(TAG) {
|
||||
) : EventDrivenViewModel<SignalLoginViewDetailsForManualSaveScreenEvents>(TAG, shouldLogEvents = false) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(SignalLoginViewDetailsForManualSaveViewModel::class)
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ import org.signal.registration.screens.util.navigateTo
|
||||
class SignalLoginPaymentViewModel(
|
||||
private val repository: RegistrationRepository,
|
||||
private val parentEventEmitter: (RegistrationFlowEvent) -> Unit
|
||||
) : EventDrivenViewModel<SignalLoginPaymentScreenEvents>(TAG) {
|
||||
) : EventDrivenViewModel<SignalLoginPaymentScreenEvents>(TAG, shouldLogEvents = true) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(SignalLoginPaymentViewModel::class)
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ class TotpEntryViewModel(
|
||||
private val parentEventEmitter: (RegistrationFlowEvent) -> Unit,
|
||||
private val resultBus: ResultEventBus,
|
||||
private val resultKey: String
|
||||
) : EventDrivenViewModel<TotpEntryScreenEvents>(TAG) {
|
||||
) : EventDrivenViewModel<TotpEntryScreenEvents>(TAG, shouldLogEvents = true) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(TotpEntryViewModel::class)
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ import org.signal.registration.screens.util.navigateTo
|
||||
class TwoFactorSelectionViewModel(
|
||||
methods: List<TwoFactorMethod>,
|
||||
private val parentEventEmitter: (RegistrationFlowEvent) -> Unit
|
||||
) : EventDrivenViewModel<TwoFactorSelectionScreenEvents>(TAG) {
|
||||
) : EventDrivenViewModel<TwoFactorSelectionScreenEvents>(TAG, shouldLogEvents = true) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(TwoFactorSelectionViewModel::class)
|
||||
|
||||
+1
-1
@@ -51,7 +51,7 @@ class VerificationCodeViewModel(
|
||||
private val parentEventEmitter: (RegistrationFlowEvent) -> Unit,
|
||||
smsCodeEvents: Flow<String> = emptyFlow(),
|
||||
private val clock: () -> Long = { System.currentTimeMillis() }
|
||||
) : EventDrivenViewModel<VerificationCodeScreenEvents>(TAG) {
|
||||
) : EventDrivenViewModel<VerificationCodeScreenEvents>(TAG, shouldLogEvents = false) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(VerificationCodeViewModel::class)
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ class WelcomeScreenViewModel(
|
||||
private val parentEventEmitter: (RegistrationFlowEvent) -> Unit,
|
||||
private val hasPermissions: () -> Boolean,
|
||||
private val getRequiredLinkedDevicePermission: () -> String?
|
||||
) : EventDrivenViewModel<WelcomeScreenEvents>(TAG) {
|
||||
) : EventDrivenViewModel<WelcomeScreenEvents>(TAG, shouldLogEvents = false) {
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(WelcomeScreenViewModel::class)
|
||||
|
||||
Reference in New Issue
Block a user