diff --git a/ts/components/conversation/message/message-item/ReadableMessage.tsx b/ts/components/conversation/message/message-item/ReadableMessage.tsx
index 64d856db3..174482ba0 100644
--- a/ts/components/conversation/message/message-item/ReadableMessage.tsx
+++ b/ts/components/conversation/message/message-item/ReadableMessage.tsx
@@ -172,7 +172,7 @@ export const ReadableMessage = (props: ReadableMessageProps) => {
onContextMenu={onContextMenu}
className={className}
as="div"
- threshold={0.5}
+ threshold={0.8}
delay={isAppFocused ? 100 : 200}
onChange={isAppFocused ? onVisible : noop}
triggerOnce={false}
diff --git a/ts/components/search/MessageSearchResults.tsx b/ts/components/search/MessageSearchResults.tsx
index 9fc443e5c..70e53d965 100644
--- a/ts/components/search/MessageSearchResults.tsx
+++ b/ts/components/search/MessageSearchResults.tsx
@@ -2,38 +2,40 @@ import React from 'react';
import classNames from 'classnames';
import { getOurPubKeyStrFromCache } from '../../session/utils/User';
-import {
- FindAndFormatContactType,
- openConversationToSpecificMessage,
-} from '../../state/ducks/conversations';
+import { openConversationToSpecificMessage } from '../../state/ducks/conversations';
import { ContactName } from '../conversation/ContactName';
import { Avatar, AvatarSize } from '../avatar/Avatar';
import { Timestamp } from '../conversation/Timestamp';
import { MessageBodyHighlight } from '../basic/MessageBodyHighlight';
import styled from 'styled-components';
import { MessageAttributes } from '../../models/messageType';
-import { useIsPrivate } from '../../hooks/useParamSelector';
+import { useConversationUsername, useIsPrivate } from '../../hooks/useParamSelector';
import { UserUtils } from '../../session/utils';
-export type PropsForSearchResults = {
- from: FindAndFormatContactType;
- to: FindAndFormatContactType;
- id: string;
- conversationId: string;
- destination: string;
- source: string;
-
- direction?: string;
- snippet?: string; //not sure about the type of snippet
- receivedAt?: number;
-};
-
export type MessageResultProps = MessageAttributes & { snippet: string };
-const FromName = (props: { source: string; destination: string }) => {
- const { source, destination } = props;
+const StyledConversationTitleResults = styled.div`
+ flex-grow: 1;
+ flex-shrink: 1;
+ font-size: 14px;
+ line-height: 18px;
+ overflow-x: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ color: var(--color-text);
+`;
+
+const StyledConversationFromUserInGroup = styled(StyledConversationTitleResults)`
+ display: inline;
+ font-size: 12px;
+ line-height: 14px;
+ overflow-x: hidden;
+`;
+
+const FromName = (props: { source: string; conversationId: string }) => {
+ const { conversationId, source } = props;
- const isNoteToSelf = destination === getOurPubKeyStrFromCache() && source === destination;
+ const isNoteToSelf = conversationId === getOurPubKeyStrFromCache() && source === conversationId;
if (isNoteToSelf) {
return (
@@ -48,33 +50,50 @@ const FromName = (props: { source: string; destination: string }) => {
}
return (
- // tslint:disable: use-simple-attributes