diff --git a/src/components/FeedSelect/FeedSelect.tsx b/src/components/FeedSelect/FeedSelect.tsx index 3a76569..57283cc 100644 --- a/src/components/FeedSelect/FeedSelect.tsx +++ b/src/components/FeedSelect/FeedSelect.tsx @@ -24,6 +24,7 @@ const FeedSelect: Component<{ isPhone?: boolean, id?: string}> = (props) => { }; const selectFeed = (option: FeedOption) => { + const [hex, includeReplies] = option.value?.split('_') || []; const selector = document.getElementById('defocus'); diff --git a/src/components/Note/NoteHeader/NoteHeader.module.scss b/src/components/Note/NoteHeader/NoteHeader.module.scss index 455d343..052bff7 100644 --- a/src/components/Note/NoteHeader/NoteHeader.module.scss +++ b/src/components/Note/NoteHeader/NoteHeader.module.scss @@ -67,7 +67,7 @@ } } .replyingTo { - font-size: 15px; + font-size: 14px; font-weight: 400; line-height: 16px; .label { diff --git a/src/components/ProfileContact/ProfileContact.tsx b/src/components/ProfileContact/ProfileContact.tsx index bae855c..d3bb12c 100644 --- a/src/components/ProfileContact/ProfileContact.tsx +++ b/src/components/ProfileContact/ProfileContact.tsx @@ -27,7 +27,9 @@ const ProfileContact: Component<{ return (
- + + +
diff --git a/src/contexts/HomeContext.tsx b/src/contexts/HomeContext.tsx index 637820a..eb324e2 100644 --- a/src/contexts/HomeContext.tsx +++ b/src/contexts/HomeContext.tsx @@ -242,7 +242,7 @@ export const HomeProvider = (props: { children: ContextChildren }) => { const selectFeed = (feed: PrimalFeed | undefined) => { if (feed !== undefined && feed.hex !== undefined) { - updateStore('selectedFeed', reconcile(feed )); + updateStore('selectedFeed', reconcile({...feed})); clearNotes(); fetchNotes(feed.hex , `${APP_ID}`, 0, feed.includeReplies); } diff --git a/src/stores/note.ts b/src/stores/note.ts index 9a933b4..5598339 100644 --- a/src/stores/note.ts +++ b/src/stores/note.ts @@ -149,7 +149,27 @@ export const convertToNotes: ConvertToNotes = (page) => { const mentionIds = Object.keys(mentions) //message.tags.reduce((acc, t) => t[0] === 'e' ? [...acc, t[1]] : acc, []); const userMentionIds = message.tags.reduce((acc, t) => t[0] === 'p' ? [...acc, t[1]] : acc, []); - const replyTo = message.tags.find(t => t[0] === 'e' && (t[3] === 'root' || t[3] === 'reply')) ; + let replyTo: string[] | undefined; + + // Determine parent by finding the `e` tag with `reply` then `root` as `marker` + // If both fail return the last `e` tag + for (let i=0; i = {}; let mentionedUsers: Record = {};