mirror of
https://github.com/irislib/iris-messenger.git
synced 2024-10-18 06:03:22 +00:00
reply thread fix
This commit is contained in:
parent
c556dfe63e
commit
3f26686f23
@ -64,21 +64,21 @@ const Note: React.FC<NoteProps> = ({
|
||||
}
|
||||
|
||||
const computedIsQuote = useMemo(
|
||||
() => isQuote || (!standalone && showReplies && replies.length),
|
||||
() => isQuote || !!(!standalone && showReplies && replies.length),
|
||||
[isQuote, standalone, showReplies, replies.length],
|
||||
);
|
||||
const computedIsQuoting = useMemo(
|
||||
() => isQuoting || (replyingTo && showRepliedMsg),
|
||||
() => isQuoting || !!(replyingTo && showRepliedMsg),
|
||||
[isQuoting, replyingTo, showRepliedMsg],
|
||||
);
|
||||
|
||||
const className = useMemo(() => {
|
||||
return classNames({
|
||||
'cursor-pointer transition-all ease-in-out duration-200 hover:bg-neutral-999': !standalone,
|
||||
'quote pb-2': computedIsQuote,
|
||||
'quoting pt-0': computedIsQuoting,
|
||||
'pb-2': computedIsQuote,
|
||||
'pt-0': computedIsQuoting,
|
||||
'pt-4': !computedIsQuoting,
|
||||
'inline-quote border-2 border-neutral-900 rounded-lg my-2': asInlineQuote,
|
||||
'border-2 border-neutral-900 rounded-lg my-2': asInlineQuote,
|
||||
'full-width':
|
||||
fullWidth || (!isReply && !computedIsQuoting && !computedIsQuote && !asInlineQuote),
|
||||
});
|
||||
@ -113,7 +113,7 @@ const Note: React.FC<NoteProps> = ({
|
||||
) : null;
|
||||
|
||||
const showThreadBtn = (
|
||||
<Show when={!standalone && !showRepliedMsg && !isReply && !isQuoting && threadRootId}>
|
||||
<Show when={!standalone && !showRepliedMsg && !isReply && !computedIsQuoting && threadRootId}>
|
||||
<Link
|
||||
className="text-iris-blue text-sm block mb-2"
|
||||
href={`/${Key.toNostrBech32Address(threadRootId || '', 'note')}`}
|
||||
@ -134,12 +134,17 @@ const Note: React.FC<NoteProps> = ({
|
||||
{showThreadBtn}
|
||||
<div className="flex flex-row" onClick={(e) => messageClicked(e)}>
|
||||
<Show when={!fullWidth}>
|
||||
<Avatar event={event} isQuote={isQuote} standalone={standalone} fullWidth={fullWidth} />
|
||||
<Avatar
|
||||
event={event}
|
||||
isQuote={computedIsQuote}
|
||||
standalone={standalone}
|
||||
fullWidth={fullWidth}
|
||||
/>
|
||||
</Show>
|
||||
<Content
|
||||
event={event}
|
||||
standalone={standalone}
|
||||
isQuote={isQuote}
|
||||
isQuote={computedIsQuote}
|
||||
asInlineQuote={asInlineQuote}
|
||||
fullWidth={fullWidth}
|
||||
/>
|
||||
|
@ -90,7 +90,7 @@ export default {
|
||||
"save": "Save",
|
||||
"save_backup_of_privkey_first": "Save a backup of your private key first!",
|
||||
"save_relays_publicly": "Save relays publicly",
|
||||
"secret_chat_info": "This is a secret chat: Outsiders cannot see that you are messaging with each other.",
|
||||
"secret_chat_info": "This is a secret chat. Outsiders cannot see that you are messaging with each other.",
|
||||
"search": "Search",
|
||||
"search_posts": "Search posts",
|
||||
"send_message": "Message",
|
||||
|
Loading…
Reference in New Issue
Block a user