Enforce stronger types for ArrayBuffers and storage
This commit is contained in:
parent
61ac79e9ae
commit
8f5086227a
56 changed files with 748 additions and 675 deletions
|
@ -229,7 +229,7 @@ export async function toAccountRecord(
|
|||
}
|
||||
|
||||
const pinnedConversations = window.storage
|
||||
.get<Array<string>>('pinnedConversationIds', [])
|
||||
.get('pinnedConversationIds', new Array<string>())
|
||||
.map(id => {
|
||||
const pinnedConversation = window.ConversationController.get(id);
|
||||
|
||||
|
@ -824,7 +824,7 @@ export async function mergeAccountRecord(
|
|||
universalExpireTimer,
|
||||
} = accountRecord;
|
||||
|
||||
window.storage.put('read-receipt-setting', readReceipts);
|
||||
window.storage.put('read-receipt-setting', Boolean(readReceipts));
|
||||
|
||||
if (typeof sealedSenderIndicators === 'boolean') {
|
||||
window.storage.put('sealedSenderIndicators', sealedSenderIndicators);
|
||||
|
@ -890,7 +890,7 @@ export async function mergeAccountRecord(
|
|||
);
|
||||
|
||||
const missingStoragePinnedConversationIds = window.storage
|
||||
.get<Array<string>>('pinnedConversationIds', [])
|
||||
.get('pinnedConversationIds', new Array<string>())
|
||||
.filter(id => !modelPinnedConversationIds.includes(id));
|
||||
|
||||
if (missingStoragePinnedConversationIds.length !== 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue