Clear profile upload flag when unregistering.

This commit is contained in:
Cody Henthorne 2021-09-20 15:09:22 -04:00 committed by Alex Hart
parent dee3d2ff2d
commit aae368c049
2 changed files with 5 additions and 0 deletions

View file

@ -30,6 +30,7 @@ class AdvancedPrivacySettingsViewModel(
AdvancedPrivacySettingsRepository.DisablePushMessagesResult.SUCCESS -> {
TextSecurePreferences.setPushRegistered(ApplicationDependencies.getApplication(), false)
SignalStore.registrationValues().clearRegistrationComplete()
SignalStore.registrationValues().clearHasUploadedProfile()
}
AdvancedPrivacySettingsRepository.DisablePushMessagesResult.NETWORK_ERROR -> {
singleEvents.postValue(Event.DISABLE_PUSH_FAILED)

View file

@ -55,4 +55,8 @@ public final class RegistrationValues extends SignalStoreValues {
public void markHasUploadedProfile() {
putBoolean(HAS_UPLOADED_PROFILE, true);
}
public void clearHasUploadedProfile() {
putBoolean(HAS_UPLOADED_PROFILE, false);
}
}