amke sure to reset link previews when replacing the text in composition
This commit is contained in:
parent
83fa26bc25
commit
1eb2e59d62
|
@ -551,6 +551,11 @@ class SessionCompositionBoxInner extends React.Component<Props, State> {
|
|||
// we try to match the first link found in the current message
|
||||
const links = window.Signal.LinkPreviews.findLinks(this.props.draft, undefined);
|
||||
if (!links || links.length === 0 || ignoredLink === links[0]) {
|
||||
if (this.state.stagedLinkPreview) {
|
||||
this.setState({
|
||||
stagedLinkPreview: undefined,
|
||||
});
|
||||
}
|
||||
return <></>;
|
||||
}
|
||||
const firstLink = links[0];
|
||||
|
|
|
@ -44,6 +44,7 @@ import { getOpenGroupV2FromConversationId } from '../opengroup/utils/OpenGroupUt
|
|||
import { createTaskWithTimeout } from '../session/utils/TaskWithTimeout';
|
||||
import { perfEnd, perfStart } from '../session/utils/Performance';
|
||||
import { ReplyingToMessageProps } from '../components/session/conversation/SessionCompositionBox';
|
||||
import { ed25519Str } from '../session/onions/onionPath';
|
||||
|
||||
export enum ConversationTypeEnum {
|
||||
GROUP = 'group',
|
||||
|
@ -231,7 +232,7 @@ export class ConversationModel extends Backbone.Model<ConversationAttributes> {
|
|||
return `opengroup(${this.id})`;
|
||||
}
|
||||
|
||||
return `group(${this.id})`;
|
||||
return `group(${ed25519Str(this.id)})`;
|
||||
}
|
||||
|
||||
public isMe() {
|
||||
|
|
Loading…
Reference in New Issue