Fix incorrect profile upload flag for existing users.

This commit is contained in:
Cody Henthorne authored and Alex Hart committed 2021-11-10 15:32:20 -04:00
1 parent 1e6a17adc3
commit ff41816fef
3 files changed
+3 -3

No files matched your search

@@ -43,7 +43,6 @@ public final class ProfileUploadJob extends BaseJob {
}
ProfileUtil.uploadProfile(context);
SignalStore.registrationValues().markHasUploadedProfile();
Log.i(TAG, "Profile uploaded.");
}
@@ -18,6 +18,7 @@ public final class RegistrationValues extends SignalStoreValues {
public synchronized void onFirstEverAppLaunch() {
getStore().beginWrite()
.putBoolean(HAS_UPLOADED_PROFILE, false)
.putBoolean(REGISTRATION_COMPLETE, false)
.putBoolean(PIN_REQUIRED, true)
.commit();
@@ -49,7 +50,7 @@ public final class RegistrationValues extends SignalStoreValues {
}
public boolean hasUploadedProfile() {
return getBoolean(HAS_UPLOADED_PROFILE, false);
return getBoolean(HAS_UPLOADED_PROFILE, true);
}
public void markHasUploadedProfile() {
@@ -292,7 +292,7 @@ public final class ProfileUtil {
Optional.fromNullable(paymentsAddress),
avatar,
badgeIds).orNull();
SignalStore.registrationValues().markHasUploadedProfile();
DatabaseFactory.getRecipientDatabase(context).setProfileAvatar(Recipient.self().getId(), avatarPath);
}