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
@ -74,10 +74,10 @@ const Lnbc: Component< {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const amount = () =>
|
const amount = () =>
|
||||||
`${humanizeNumber(parseInt(invoice.sections.find(s => s.name === 'amount')?.value ||'0') / 1_000)} sats`;
|
`${humanizeNumber(parseInt(invoice.sections.find(s => s.name === 'amount')?.value || '0') / 1_000)} sats`;
|
||||||
|
|
||||||
const description = () =>
|
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({
|
const confirmPayment = () => app?.actions.openConfirmModal({
|
||||||
title: intl.formatMessage(lnInvoice.confirm.title),
|
title: intl.formatMessage(lnInvoice.confirm.title),
|
||||||
|
@ -182,14 +182,15 @@ export const MessagesProvider = (props: { children: ContextChildren }) => {
|
|||||||
|
|
||||||
batch(() => {
|
batch(() => {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
updateStore('senders', () => undefined);
|
// updateStore('senders', () => undefined);
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
updateStore('messageCountPerSender', () => undefined);
|
// updateStore('messageCountPerSender', () => undefined);
|
||||||
|
|
||||||
updateStore('senders', () => ({ ...senders}));
|
updateStore('senders', () => ({ ...senders}));
|
||||||
updateStore('messageCountPerSender', () => ({ ...counts }));
|
updateStore('messageCountPerSender', () => ({ ...counts }));
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
getMessageCounts(account.publicKey, store.senderRelation, subidMsgCountPerSender);
|
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: {}, counts: {} };
|
||||||
}
|
}
|
||||||
|
|
||||||
store.dmConversations.profiles = { ...contacts };
|
store.dmConversations.profiles = { ...store.dmConversations.profiles, ...contacts };
|
||||||
store.dmConversations.counts = { ...counts };
|
store.dmConversations.counts = { ...store.dmConversations.counts, ...counts };
|
||||||
|
|
||||||
setStorage(pubkey, store);
|
setStorage(pubkey, store);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user