Fix Contact Modal and improve Debug Log window
This commit is contained in:
parent
5d051ae16a
commit
c369e44d8e
7 changed files with 22 additions and 15 deletions
|
@ -71,7 +71,7 @@ export const DebugLogWindow = ({
|
|||
const linesToShow = Math.ceil(Math.min(window.innerHeight, 2000) / 5);
|
||||
const value = fetchedLogText.split(/\n/g, linesToShow).join('\n');
|
||||
|
||||
setTextAreaValue(value);
|
||||
setTextAreaValue(`${value}\n\n\n${i18n('debugLogLogIsIncomplete')}`);
|
||||
setToastType(undefined);
|
||||
}
|
||||
|
||||
|
@ -80,7 +80,7 @@ export const DebugLogWindow = ({
|
|||
return () => {
|
||||
shouldCancel = true;
|
||||
};
|
||||
}, [fetchLogs]);
|
||||
}, [fetchLogs, i18n]);
|
||||
|
||||
const handleSubmit = async (ev: MouseEvent) => {
|
||||
ev.preventDefault();
|
||||
|
|
|
@ -86,11 +86,11 @@ export const ContactModal = ({
|
|||
);
|
||||
|
||||
useEffect(() => {
|
||||
if (conversation?.id) {
|
||||
if (contact?.id) {
|
||||
// Kick off the expensive hydration of the current sharedGroupNames
|
||||
updateConversationModelSharedGroups(conversation.id);
|
||||
updateConversationModelSharedGroups(contact.id);
|
||||
}
|
||||
}, [conversation?.id, updateConversationModelSharedGroups]);
|
||||
}, [contact?.id, updateConversationModelSharedGroups]);
|
||||
|
||||
let modalNode: ReactNode;
|
||||
switch (subModalState) {
|
||||
|
|
|
@ -31,7 +31,7 @@ type PropsType = {
|
|||
onBlockAndReportSpam: (conversationId: string) => unknown;
|
||||
onClose: () => void;
|
||||
onDelete: (conversationId: string) => unknown;
|
||||
onShowContactModal: (contactId: string) => unknown;
|
||||
onShowContactModal: (contactId: string, conversationId?: string) => unknown;
|
||||
onUnblock: (conversationId: string) => unknown;
|
||||
removeMember: (conversationId: string) => unknown;
|
||||
theme: ThemeType;
|
||||
|
|
|
@ -294,7 +294,7 @@ export type PropsActions = {
|
|||
contact: EmbeddedContactType;
|
||||
signalAccount?: string;
|
||||
}) => void;
|
||||
showContactModal: (contactId: string) => void;
|
||||
showContactModal: (contactId: string, conversationId?: string) => void;
|
||||
|
||||
kickOffAttachmentDownload: (options: {
|
||||
attachment: AttachmentType;
|
||||
|
@ -1380,12 +1380,13 @@ export class Message extends React.PureComponent<Props, State> {
|
|||
private renderAvatar(): ReactNode {
|
||||
const {
|
||||
author,
|
||||
conversationId,
|
||||
conversationType,
|
||||
direction,
|
||||
getPreferredBadge,
|
||||
i18n,
|
||||
showContactModal,
|
||||
theme,
|
||||
conversationType,
|
||||
direction,
|
||||
} = this.props;
|
||||
|
||||
if (conversationType !== 'group' || direction !== 'incoming') {
|
||||
|
@ -1415,7 +1416,7 @@ export class Message extends React.PureComponent<Props, State> {
|
|||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
|
||||
showContactModal(author.id);
|
||||
showContactModal(author.id, conversationId);
|
||||
}}
|
||||
phoneNumber={author.phoneNumber}
|
||||
profileName={author.profileName}
|
||||
|
|
|
@ -103,7 +103,7 @@ type ActionProps = {
|
|||
deleteAvatarFromDisk: DeleteAvatarFromDiskActionType;
|
||||
replaceAvatar: ReplaceAvatarActionType;
|
||||
saveAvatarToDisk: SaveAvatarToDiskActionType;
|
||||
showContactModal: (contactId: string, conversationId: string) => void;
|
||||
showContactModal: (contactId: string, conversationId?: string) => void;
|
||||
toggleSafetyNumberModal: (conversationId: string) => unknown;
|
||||
searchInConversation: (id: string) => unknown;
|
||||
};
|
||||
|
|
|
@ -26,7 +26,7 @@ export type Props = {
|
|||
i18n: LocalizerType;
|
||||
maxShownMemberCount?: number;
|
||||
memberships: Array<GroupV2Membership>;
|
||||
showContactModal: (contactId: string, conversationId: string) => void;
|
||||
showContactModal: (contactId: string, conversationId?: string) => void;
|
||||
startAddingNewMembers?: () => void;
|
||||
theme: ThemeType;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue