Fix bug where username wasn't synced to ContactRecord.

main
Greyson Parrelli 2023-02-16 14:37:38 -05:00
rodzic ce4e84aadc
commit 4cfba86cb1
2 zmienionych plików z 6 dodań i 5 usunięć

Wyświetl plik

@ -105,11 +105,11 @@ public final class StorageSyncHelper {
} }
public static SignalStorageRecord buildAccountRecord(@NonNull Context context, @NonNull Recipient self) { public static SignalStorageRecord buildAccountRecord(@NonNull Context context, @NonNull Recipient self) {
RecipientTable recipientTable = SignalDatabase.recipients(); RecipientTable recipientTable = SignalDatabase.recipients();
RecipientRecord record = recipientTable.getRecordForSync(self.getId()); RecipientRecord record = recipientTable.getRecordForSync(self.getId());
List<RecipientRecord> pinned = Stream.of(SignalDatabase.threads().getPinnedRecipientIds()) List<RecipientRecord> pinned = Stream.of(SignalDatabase.threads().getPinnedRecipientIds())
.map(recipientTable::getRecordForSync) .map(recipientTable::getRecordForSync)
.toList(); .toList();
final OptionalBool storyViewReceiptsState = SignalStore.storyValues().getViewedReceiptsEnabled() ? OptionalBool.ENABLED final OptionalBool storyViewReceiptsState = SignalStore.storyValues().getViewedReceiptsEnabled() ? OptionalBool.ENABLED
: OptionalBool.DISABLED; : OptionalBool.DISABLED;

Wyświetl plik

@ -127,6 +127,7 @@ public final class StorageSyncModels {
.setHideStory(hideStory) .setHideStory(hideStory)
.setUnregisteredTimestamp(recipient.getSyncExtras().getUnregisteredTimestamp()) .setUnregisteredTimestamp(recipient.getSyncExtras().getUnregisteredTimestamp())
.setHidden(recipient.isHidden()) .setHidden(recipient.isHidden())
.setUsername(recipient.getUsername())
.build(); .build();
} }