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

non-actionable download states hide action button #1981

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

r10s
Copy link
Member

@r10s r10s commented Nov 15, 2023

this is achieved by showing the button on known actions instead of duplicating some logic as before
(which led to DC_DOWNLOAD_UNDECIPHERABLE being regarded as an action)

closes #1980

this is achieved by showing the button on known actions
instead of duplicating some logic as before
(which led to DC_DOWNLOAD_UNDECIPHERABLE being regarded as an action)
@@ -393,21 +393,27 @@ public class BaseMessageCell: UITableViewCell {
let downloadState = msg.downloadState
let hasHtml = msg.hasHtml
let hasWebxdc = msg.type == DC_MSG_WEBXDC
isActionButtonHidden = !hasWebxdc && !hasHtml && downloadState == DC_DOWNLOAD_DONE
Copy link
Member Author

Choose a reason for hiding this comment

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

don't make me think - the logic below is much easier to read and understand :)

Copy link
Member

@adbenitez adbenitez left a comment

Choose a reason for hiding this comment

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

don't make me think 🐒

@r10s r10s merged commit 785a3dd into main Nov 15, 2023
1 check passed
@r10s r10s deleted the check-DC_DOWNLOAD_UNDECIPHERABLE branch November 15, 2023 23:31
@r10s r10s added the bug label Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check for DC_DOWNLOAD_UNDECIPHERABLE
2 participants