This commit is contained in:
Bojan Mojsilovic 2024-04-15 16:21:41 +02:00
parent 9bbf5882ce
commit e3a58637a7
3 changed files with 7 additions and 6 deletions

View File

@ -77,7 +77,7 @@ const Lnbc: Component< {
`${humanizeNumber(parseInt(invoice.sections.find(s => s.name === 'amount')?.value || '0') / 1_000)} sats`;
const description = () =>
decodeURI(invoice.sections.find(s => s.name === 'description')?.value);
decodeURI(invoice.sections.find(s => s.name === 'description')?.value) || '';
const confirmPayment = () => app?.actions.openConfirmModal({
title: intl.formatMessage(lnInvoice.confirm.title),

View File

@ -182,14 +182,15 @@ export const MessagesProvider = (props: { children: ContextChildren }) => {
batch(() => {
// @ts-ignore
updateStore('senders', () => undefined);
// updateStore('senders', () => undefined);
// @ts-ignore
updateStore('messageCountPerSender', () => undefined);
// updateStore('messageCountPerSender', () => undefined);
updateStore('senders', () => ({ ...senders}));
updateStore('messageCountPerSender', () => ({ ...counts }));
})
// @ts-ignore
getMessageCounts(account.publicKey, store.senderRelation, subidMsgCountPerSender);
}

View File

@ -423,8 +423,8 @@ export const saveDmConversations = (pubkey: string | undefined, contacts: Record
store.dmConversations = { profiles: {}, counts: {} };
}
store.dmConversations.profiles = { ...contacts };
store.dmConversations.counts = { ...counts };
store.dmConversations.profiles = { ...store.dmConversations.profiles, ...contacts };
store.dmConversations.counts = { ...store.dmConversations.counts, ...counts };
setStorage(pubkey, store);
}