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

Minor UI fixes #1386

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
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: 4 additions & 0 deletions lib/pages/chat/input_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,10 @@ class InputBar extends StatelessWidget {
final data = content.data;
if (data == null) return;

if (content.mimeType.startsWith("image/")) {
onSubmitImage!(data);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I use this feature mostly with the GBoard when sending a sticker or GIF. Having a dialog every time would be just overhead IMO

Copy link
Author

@k3-cat k3-cat Oct 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah... that will be very inconvenient....

But I think media is a bit expensive for the matrix. Currently both Android and web can upload images by pasting. So without visual confirmation, users might accidentally upload contents either they don't want or in its original quality (average screenshot takes about 7M, and in most case it's unnecessary to keep the original quality). Thus, putting more burden on home-level servers.

What if we only show the dialog for images larger than a certain size (e.g. 1M)?

return;
}
final file = MatrixFile(
mimeType: content.mimeType,
bytes: data,
Expand Down