kopia lustrzana https://github.com/ryukoposting/Signal-Android
Fix incorrect profile upload flag for existing users.
rodzic
1e6a17adc3
commit
ff41816fef
|
@ -43,7 +43,6 @@ public final class ProfileUploadJob extends BaseJob {
|
||||||
}
|
}
|
||||||
|
|
||||||
ProfileUtil.uploadProfile(context);
|
ProfileUtil.uploadProfile(context);
|
||||||
SignalStore.registrationValues().markHasUploadedProfile();
|
|
||||||
Log.i(TAG, "Profile uploaded.");
|
Log.i(TAG, "Profile uploaded.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,7 @@ public final class RegistrationValues extends SignalStoreValues {
|
||||||
|
|
||||||
public synchronized void onFirstEverAppLaunch() {
|
public synchronized void onFirstEverAppLaunch() {
|
||||||
getStore().beginWrite()
|
getStore().beginWrite()
|
||||||
|
.putBoolean(HAS_UPLOADED_PROFILE, false)
|
||||||
.putBoolean(REGISTRATION_COMPLETE, false)
|
.putBoolean(REGISTRATION_COMPLETE, false)
|
||||||
.putBoolean(PIN_REQUIRED, true)
|
.putBoolean(PIN_REQUIRED, true)
|
||||||
.commit();
|
.commit();
|
||||||
|
@ -49,7 +50,7 @@ public final class RegistrationValues extends SignalStoreValues {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasUploadedProfile() {
|
public boolean hasUploadedProfile() {
|
||||||
return getBoolean(HAS_UPLOADED_PROFILE, false);
|
return getBoolean(HAS_UPLOADED_PROFILE, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void markHasUploadedProfile() {
|
public void markHasUploadedProfile() {
|
||||||
|
|
|
@ -292,7 +292,7 @@ public final class ProfileUtil {
|
||||||
Optional.fromNullable(paymentsAddress),
|
Optional.fromNullable(paymentsAddress),
|
||||||
avatar,
|
avatar,
|
||||||
badgeIds).orNull();
|
badgeIds).orNull();
|
||||||
|
SignalStore.registrationValues().markHasUploadedProfile();
|
||||||
DatabaseFactory.getRecipientDatabase(context).setProfileAvatar(Recipient.self().getId(), avatarPath);
|
DatabaseFactory.getRecipientDatabase(context).setProfileAvatar(Recipient.self().getId(), avatarPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue