-
Notifications
You must be signed in to change notification settings - Fork 368
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
Add in-app notification for latest changes #7484
Add in-app notification for latest changes #7484
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 19 of 19 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @mojganii)
ios/MullvadVPN/Notifications/Notification Providers/LatestChangesNotificationProvider.swift
line 19 at r1 (raw file):
} var isUpdated: Bool {
We should add a comment explaining that the first check is here to make sure we don't show the changelog notifications on new installations. (I'm assuming this is here for that reason, otherwise it would seem redundant)
Also isUpdated
sounds good, but I think we can do even better: shouldShowNotification
Since this is only used here, it makes it immediately obvious what we use this for.
ios/MullvadVPN/Notifications/Notification Providers/InApp/LatestChangesInAppNotificationProvider.swift
line 11 at r1 (raw file):
import UIKit class LatestChangesInAppNotificationProvider: NotificationProvider, InAppNotificationProvider, @unchecked Sendable {
This file doesn't seem to be referenced anywhere in Xcode, or the pbx proj file, I'm very confused now at how this works at all.
Given that I've just tested that the feature already works, it looks like we can delete this ?
d585dd5
to
b5c82f3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 14 of 19 files reviewed, 2 unresolved discussions (waiting on @buggmagnet)
ios/MullvadVPN/Notifications/Notification Providers/LatestChangesNotificationProvider.swift
line 19 at r1 (raw file):
Previously, buggmagnet wrote…
We should add a comment explaining that the first check is here to make sure we don't show the changelog notifications on new installations. (I'm assuming this is here for that reason, otherwise it would seem redundant)
Also
isUpdated
sounds good, but I think we can do even better:shouldShowNotification
Since this is only used here, it makes it immediately obvious what we use this for.
Done.
ios/MullvadVPN/Notifications/Notification Providers/InApp/LatestChangesInAppNotificationProvider.swift
line 11 at r1 (raw file):
Previously, buggmagnet wrote…
This file doesn't seem to be referenced anywhere in Xcode, or the pbx proj file, I'm very confused now at how this works at all.
Given that I've just tested that the feature already works, it looks like we can delete this ?
fixed. I reset the commit but it seemed Xcode didn't take action properly.
f63ffdc
to
72f8e19
Compare
72f8e19
to
52b4603
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 13 of 19 files at r1, 5 of 5 files at r2, 2 of 2 files at r3, 6 of 6 files at r4, all commit messages.
Reviewable status: all files reviewed, 5 unresolved discussions (waiting on @buggmagnet and @mojganii)
ios/MullvadVPN/Coordinators/ChangeLogCoordinator.swift
line 24 at r3 (raw file):
} var presentationContext: UIViewController {
If presentationContext
should not be needed here, only presentedViewController
is necessary to fulfill Presentable
protocol.
ios/MullvadVPN/Notifications/Notification Providers/LatestChangesNotificationProvider.swift
line 42 at r3 (raw file):
style: .success, title: NSLocalizedString( "Latest_Changes_IN_APP_NOTIFICATION_TITLE",
I think we always use all caps for these identifiers.
ios/MullvadVPN/Notifications/Notification Providers/LatestChangesNotificationProvider.swift
line 55 at r3 (raw file):
NSAttributedString( markdownString: NSLocalizedString( "Latest_Changes_IN_APP_NOTIFICATION_BODY",
I think we always use all caps for these identifiers.
52b4603
to
f3b1f41
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 18 of 22 files reviewed, 5 unresolved discussions (waiting on @buggmagnet and @rablador)
ios/MullvadVPN/Coordinators/ChangeLogCoordinator.swift
line 24 at r3 (raw file):
Previously, rablador (Jon Petersson) wrote…
If
presentationContext
should not be needed here, onlypresentedViewController
is necessary to fulfillPresentable
protocol.
that was for adding button to navigation bar. however, I changed that to be managed in coordinator
instead.
ios/MullvadVPN/Notifications/Notification Providers/LatestChangesNotificationProvider.swift
line 42 at r3 (raw file):
Previously, rablador (Jon Petersson) wrote…
I think we always use all caps for these identifiers.
Good catch.
ios/MullvadVPN/Notifications/Notification Providers/LatestChangesNotificationProvider.swift
line 55 at r3 (raw file):
Previously, rablador (Jon Petersson) wrote…
I think we always use all caps for these identifiers.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 5 files at r2, 1 of 2 files at r3, 6 of 6 files at r4, 4 of 4 files at r5, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @rablador)
f3b1f41
to
950969d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 4 files at r5, 9 of 9 files at r6, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved
950969d
to
7375a17
Compare
eb21418
to
8ae7970
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 18 of 23 files reviewed, 1 unresolved discussion (waiting on @mojganii)
ios/CHANGELOG.md
line 28 at r7 (raw file):
- Broken DAITA settings view on iOS 15. ### Changed - Moved Changelog to settings and introduced an in-app notification banner to inform users of changes
Should be "Move
changelog [...] and introduce
an [...]"
8ae7970
to
04c7549
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 5 of 5 files at r8, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @mojganii)
04c7549
to
5f9315b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 5 of 5 files at r10, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @mojganii)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @mojganii)
This PR adds in-app notification once app is updated. in addition, It shows the changes when user taps whole notification bar.
This change is