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

Don't always show the sender in notifications #3441

Merged
merged 3 commits into from
Nov 25, 2024

Conversation

Hocuri
Copy link
Collaborator

@Hocuri Hocuri commented Nov 23, 2024

In 1:1 chats, don't prepend the sender name to every line. The exception is when the display name is not equal to the chat name (i.e. there is an OverwriteSenderDisplayname), in this case we still prepend it.

This is how it looks when Bob2 sends 4 messages, and then I get 1 message from Hocuri4 that is assigned to the same chat:

Screenshot_20241123-202426

Copy link

To test the changes in this pull request, install this apk:
📦 app-preview.apk

DcContact contact = dcContext.getContact(dcMsg.getFromId());
tickerLine = dcMsg.getSenderName(contact, false) + ": " + tickerLine;

if (!Util.equals(dcChat.getName(), contact.getDisplayName())) {
Copy link
Member

@adbenitez adbenitez Nov 23, 2024

Choose a reason for hiding this comment

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

this sounds hacky (ex. if someone sets name == group name), I would directly check:
IF dcChat is multi-user OR dcMsg has overriden sender name THEN show it ELSE don't show it

Copy link

To test the changes in this pull request, install this apk:
📦 app-preview.apk

@Hocuri
Copy link
Collaborator Author

Hocuri commented Nov 25, 2024

This PR now accidentally contains commit bf0ee26 of #3442, actually the PR here is only about the other commits

When we introduced this, I assume that we weren't sure whether we should
do it and only showed it in some places. But I think it's nicer to
show the same sender name everywhere, i.e. always add the "~".
@Hocuri Hocuri force-pushed the hoc/dont-always-show-sender-in-notifications branch from 4c4ec1a to 0cf4ed1 Compare November 25, 2024 13:23
@Hocuri Hocuri merged commit 60e9a91 into main Nov 25, 2024
2 checks passed
@Hocuri Hocuri deleted the hoc/dont-always-show-sender-in-notifications branch November 25, 2024 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants