mirror of
https://github.com/PrimalHQ/primal-web-app.git
synced 2024-10-01 17:31:13 +00:00
Fix DMs
This commit is contained in:
parent
9bbf5882ce
commit
e3a58637a7
@ -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),
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user