Persist hasSetMyStoriesPrivacy in storage service
This commit is contained in:
parent
03b750d072
commit
ae01ad4276
2 changed files with 8 additions and 0 deletions
|
@ -152,6 +152,7 @@ message AccountRecord {
|
|||
optional string subscriberCurrencyCode = 22;
|
||||
optional bool displayBadgesOnProfile = 23;
|
||||
optional bool keepMutedChatsArchived = 25;
|
||||
optional bool hasSetMyStoriesPrivacy = 26;
|
||||
}
|
||||
|
||||
message StoryDistributionListRecord {
|
||||
|
|
|
@ -343,6 +343,11 @@ export function toAccountRecord(
|
|||
accountRecord.keepMutedChatsArchived = keepMutedChatsArchived;
|
||||
}
|
||||
|
||||
const hasSetMyStoriesPrivacy = window.storage.get('hasSetMyStoriesPrivacy');
|
||||
if (hasSetMyStoriesPrivacy !== undefined) {
|
||||
accountRecord.hasSetMyStoriesPrivacy = hasSetMyStoriesPrivacy;
|
||||
}
|
||||
|
||||
applyUnknownFields(accountRecord, conversation);
|
||||
|
||||
return accountRecord;
|
||||
|
@ -1024,6 +1029,7 @@ export async function mergeAccountRecord(
|
|||
subscriberCurrencyCode,
|
||||
displayBadgesOnProfile,
|
||||
keepMutedChatsArchived,
|
||||
hasSetMyStoriesPrivacy,
|
||||
} = accountRecord;
|
||||
|
||||
const updatedConversations = new Array<ConversationModel>();
|
||||
|
@ -1216,6 +1222,7 @@ export async function mergeAccountRecord(
|
|||
}
|
||||
window.storage.put('displayBadgesOnProfile', Boolean(displayBadgesOnProfile));
|
||||
window.storage.put('keepMutedChatsArchived', Boolean(keepMutedChatsArchived));
|
||||
window.storage.put('hasSetMyStoriesPrivacy', Boolean(hasSetMyStoriesPrivacy));
|
||||
|
||||
const ourID = window.ConversationController.getOurConversationId();
|
||||
|
||||
|
|
Loading…
Reference in a new issue