Change defaults for conversation title generation

This commit is contained in:
Fedor Indutny 2024-02-07 13:38:43 -08:00 committed by GitHub
parent 6a165da589
commit bd922433e3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 142 additions and 24 deletions

View file

@ -247,12 +247,6 @@ export function createIPCEvents(
setPhoneNumberSharingSetting: async (newValue: PhoneNumberSharingMode) => {
const account = window.ConversationController.getOurConversationOrThrow();
// writeProfile fetches the latest profile first so do it before updating
// local data to prevent triggering a conflict.
await writeProfile(getConversation(account), {
keepAvatar: true,
});
const promises = new Array<Promise<void>>();
promises.push(window.storage.put('phoneNumberSharingMode', newValue));
if (newValue === PhoneNumberSharingMode.Everybody) {
@ -264,6 +258,12 @@ export function createIPCEvents(
}
account.captureChange('phoneNumberSharingMode');
await Promise.all(promises);
// Write profile after updating storage so that the write has up-to-date
// information.
await writeProfile(getConversation(account), {
keepAvatar: true,
});
},
getHasStoriesDisabled: () =>