Fix incorrect profile upload flag for existing users.

This commit is contained in:
Cody Henthorne
2021-11-10 14:03:04 -05:00
committed by Alex Hart
parent 1e6a17adc3
commit ff41816fef
3 changed files with 3 additions and 3 deletions

View File

@@ -43,7 +43,6 @@ public final class ProfileUploadJob extends BaseJob {
}
ProfileUtil.uploadProfile(context);
SignalStore.registrationValues().markHasUploadedProfile();
Log.i(TAG, "Profile uploaded.");
}

View File

@@ -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() {

View File

@@ -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);
}