mirror of
https://github.com/KoalaSat/nostros.git
synced 2024-09-28 22:30:41 +00:00
Fix load from note to note
This commit is contained in:
parent
831a2a44cf
commit
e4fba4f7e8
@ -30,13 +30,13 @@ export const NotePage: React.FC = () => {
|
||||
const breadcrump = page.split('%');
|
||||
const eventId = breadcrump[breadcrump.length - 1].split('#')[1];
|
||||
|
||||
const reload: () => void = () => {
|
||||
const reload: (newEventId?: string) => void = (newEventId) => {
|
||||
setNote(undefined);
|
||||
setReplies(undefined);
|
||||
relayPool?.unsubscribeAll();
|
||||
relayPool?.subscribe('main-channel', {
|
||||
kinds: [EventKind.textNote],
|
||||
ids: [eventId],
|
||||
ids: [newEventId ?? eventId],
|
||||
});
|
||||
};
|
||||
|
||||
@ -82,7 +82,7 @@ export const NotePage: React.FC = () => {
|
||||
const replyId = getReplyEventId(note);
|
||||
if (replyId) {
|
||||
goToPage(`note#${replyId}`);
|
||||
reload();
|
||||
reload(replyId);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user