File tree Expand file tree Collapse file tree
app/src/main/java/org/thoughtcrime/securesms Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -156,7 +156,6 @@ object SvrRepository {
156156 SignalStore .svr.isRegistrationLockEnabled = false
157157 SignalStore .pin.resetPinReminders()
158158 SignalStore .svr.isPinForgottenOrSkipped = false
159- SignalStore .storageService.setNeedsAccountRestore(false )
160159 SignalStore .pin.keyboardType = pinKeyboardType
161160 SignalStore .storageService.setNeedsAccountRestore(false )
162161
Original file line number Diff line number Diff line change @@ -827,26 +827,25 @@ class RegistrationViewModel : ViewModel() {
827827
828828 if (reglockEnabled) {
829829 SignalStore .onboarding.clearAll()
830- val stopwatch = Stopwatch (" RegistrationLockRestore" )
830+ }
831+
832+ if (reglockEnabled || SignalStore .storageService.lastSyncTime == 0L ) {
833+ val stopwatch = Stopwatch (" post-reg-storage-service" )
831834
832835 AppDependencies .jobManager.runSynchronously(StorageAccountRestoreJob (), StorageAccountRestoreJob .LIFESPAN )
833- stopwatch.split(" AccountRestore " )
836+ stopwatch.split(" account-restore " )
834837
835838 AppDependencies .jobManager
836839 .startChain(StorageSyncJob ())
837840 .then(ReclaimUsernameAndLinkJob ())
838841 .enqueueAndBlockUntilCompletion(TimeUnit .SECONDS .toMillis(10 ))
839- stopwatch.split(" ContactRestore" )
840-
841- refreshRemoteConfig()
842-
843- stopwatch.split(" RemoteConfig" )
842+ stopwatch.split(" storage-sync" )
844843
845844 stopwatch.stop(TAG )
846- } else {
847- refreshRemoteConfig()
848845 }
849846
847+ refreshRemoteConfig()
848+
850849 store.update {
851850 it.copy(
852851 registrationCheckpoint = RegistrationCheckpoint .LOCAL_REGISTRATION_COMPLETE ,
You can’t perform that action at this time.
0 commit comments