-
Notifications
You must be signed in to change notification settings - Fork 6
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
Stories library part 9.1 - added errorNotification Delete pendingIntent loader and base error notification ID setter #361
Conversation
You can test the changes on this Pull Request by downloading the APK here. |
…e, so the baseErrorNotificationID is set first of all
@@ -199,7 +203,23 @@ abstract class ComposeLoopFrameActivity : AppCompatActivity(), OnStoryFrameSelec | |||
} | |||
// Setup notification intent for notifications triggered from the FrameSaveService.FrameSaveNotifier class | |||
notificationIntentLoader?.let { | |||
// set the base notification Error Id. This is given on purpose so the host app can give a unique | |||
// set of notific ations ID to base our error notifications from, and avoid collision with other |
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.
// set of notific ations ID to base our error notifications from, and avoid collision with other | |
// set of notifications ID to base our error notifications from, and avoid collision with other |
😅
// set the base notification Error Id. This is given on purpose so the host app can give a unique | ||
// set of notific ations ID to base our error notifications from, and avoid collision with other | ||
// notifications the host app may have | ||
// IMPORTANT: this needs to be the first call in the methods linedup for NotificationIntentLoader |
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.
// IMPORTANT: this needs to be the first call in the methods linedup for NotificationIntentLoader | |
// IMPORTANT: this needs to be the first call in the methods lined up for NotificationIntentLoader |
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.
Thanks for these changes @mzorz This looks good! LGTM 🚢 I left some minor typo comments but just wanted to merge this to get things moving 🙏
Builds on top of #359
Related WPAndroid PR: wordpress-mobile/WordPress-Android#12059
This PR adds an interface so to be able to set the error notification base ID from the host app. This is useful to avoid potential reuse of the same notification ID by some other notification in the host app.
Also, augmented the
NotificationIntentLoader
interface with methodloadPendingIntentForErrorNotificationDeletion
so pending intent for notificatiton Dismiss can also be loaded / set from the host app, enabling tracking and customizable actions when an error notification is dismissed.