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

Fix regression when marking notifications as read #1214

Merged
merged 1 commit into from
Jul 15, 2022

Conversation

Fs00
Copy link
Contributor

@Fs00 Fs00 commented Jul 15, 2022

74e0112 introduced a regression that caused notifications not being marked as read after opening them in most cases:

LinkParser.ParseResult result = LinkParser.parseUri(getActivity(), uri, initialComment);
if (result != null && result.intent != null) {
intent = result.intent;
} else {

When the above if condition is true, the notification is not marked as read.

This PR proposes a simpler fix for #1208 since the problem with "unsupported" notifications (like discussion ones) is that they don't have a URL, because if they had it, the URL would be opened in a browser/custom tab instead of doing nothing.

I've tested this fix with a PR notification and a discussion notification and it behaved as expected.

@maniac103
Copy link
Collaborator

That's what one gets for last minute fixes sigh
Thanks!

@maniac103 maniac103 merged commit dabf46e into slapperwan:master Jul 15, 2022
@Fs00 Fs00 deleted the fix-mark-as-read branch July 15, 2022 07:25
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