Hide "become a sustainer" button if you're already a sustainer
This commit is contained in:
parent
7edf3763a8
commit
67b17ec317
22 changed files with 318 additions and 26 deletions
|
@ -293,6 +293,19 @@ export async function toAccountRecord(
|
|||
);
|
||||
|
||||
accountRecord.pinnedConversations = pinnedConversations;
|
||||
|
||||
const subscriberId = window.storage.get('subscriberId');
|
||||
if (subscriberId instanceof Uint8Array) {
|
||||
accountRecord.subscriberId = subscriberId;
|
||||
}
|
||||
const subscriberCurrencyCode = window.storage.get('subscriberCurrencyCode');
|
||||
if (typeof subscriberCurrencyCode === 'string') {
|
||||
accountRecord.subscriberCurrencyCode = subscriberCurrencyCode;
|
||||
}
|
||||
accountRecord.displayBadgesOnProfile = Boolean(
|
||||
window.storage.get('displayBadgesOnProfile')
|
||||
);
|
||||
|
||||
applyUnknownFields(accountRecord, conversation);
|
||||
|
||||
return accountRecord;
|
||||
|
@ -845,6 +858,9 @@ export async function mergeAccountRecord(
|
|||
universalExpireTimer,
|
||||
e164: accountE164,
|
||||
preferredReactionEmoji: rawPreferredReactionEmoji,
|
||||
subscriberId,
|
||||
subscriberCurrencyCode,
|
||||
displayBadgesOnProfile,
|
||||
} = accountRecord;
|
||||
|
||||
window.storage.put('read-receipt-setting', Boolean(readReceipts));
|
||||
|
@ -1018,6 +1034,14 @@ export async function mergeAccountRecord(
|
|||
window.storage.put('pinnedConversationIds', remotelyPinnedConversationIds);
|
||||
}
|
||||
|
||||
if (subscriberId instanceof Uint8Array) {
|
||||
window.storage.put('subscriberId', subscriberId);
|
||||
}
|
||||
if (typeof subscriberCurrencyCode === 'string') {
|
||||
window.storage.put('subscriberCurrencyCode', subscriberCurrencyCode);
|
||||
}
|
||||
window.storage.put('displayBadgesOnProfile', Boolean(displayBadgesOnProfile));
|
||||
|
||||
const ourID = window.ConversationController.getOurConversationId();
|
||||
|
||||
if (!ourID) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue