Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Generated By Dashwave AI] Align Message Content Deletion Experience with Web App #40

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/chat/ChatScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@
() => undefined,
);

if ((content !== undefined && content !== '') || (topic !== undefined && topic !== '')) {
if (content !== undefined || topic !== undefined) {
api.updateMessage(auth, editMessage.id, { content, subject: topic }).catch(error => {
showErrorAlert(_('Failed to edit message'), error.message);
});
Expand Down Expand Up @@ -287,4 +287,4 @@
)}
</KeyboardAvoider>
);
}
}

Check failure on line 290 in src/chat/ChatScreen.js

View workflow job for this annotation

GitHub Actions / test

Newline required at end of file but not found

Check failure on line 290 in src/chat/ChatScreen.js

View workflow job for this annotation

GitHub Actions / test

Newline required at end of file but not found
7 changes: 4 additions & 3 deletions src/compose/ComposeBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@
(videoChatProvider: VideoChatProvider) => {
if (videoChatProvider.name === 'jitsi_meet') {
// This is meant to align with the way the webapp generates jitsi video
// call IDs. That logic can be found in the ".video_link" click handler
// call IDs. That logic can be found in the "video_link" click handler
// in static/js/compose.js.
const videoCallId = randomInt(100000000000000, 999999999999999);
const videoCallUrl = `${videoChatProvider.jitsiServerUrl}/${videoCallId}`;
Expand Down Expand Up @@ -554,7 +554,7 @@
result.push('mandatory-topic-empty');
}

if (messageInputValue.trim().length === 0) {
if (!isEditing && messageInputValue.trim().length === 0) {
result.push('message-empty');
}

Expand All @@ -573,6 +573,7 @@
numUploading,
anyQuoteAndReplyInProgress,
messageInputState,
isEditing,
]);

const submitButtonDisabled = validationErrors.length > 0;
Expand Down Expand Up @@ -818,4 +819,4 @@
);
});

export default ComposeBox;
export default ComposeBox;

Check failure on line 822 in src/compose/ComposeBox.js

View workflow job for this annotation

GitHub Actions / test

Newline required at end of file but not found

Check failure on line 822 in src/compose/ComposeBox.js

View workflow job for this annotation

GitHub Actions / test

Newline required at end of file but not found
Loading