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

Stories library part 9.1 - added errorNotification Delete pendingIntent loader and base error notification ID setter #361

Conversation

mzorz
Copy link
Contributor

@mzorz mzorz commented May 30, 2020

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 method loadPendingIntentForErrorNotificationDeletion 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.

@peril-automattic
Copy link

peril-automattic bot commented May 30, 2020

You can test the changes on this Pull Request by downloading the APK here.

@mzorz mzorz changed the title Stories library part 9.2 - added errorNotification pendingIntent loader to IntentLoader interface Stories library part 9.2 - added errorNotification Delete pendingIntent loader to IntentLoader interface May 30, 2020
@mzorz mzorz changed the title Stories library part 9.2 - added errorNotification Delete pendingIntent loader to IntentLoader interface Stories library part 9.2 - added errorNotification Delete pendingIntent loader and base error notification ID setter May 30, 2020
@mzorz mzorz changed the title Stories library part 9.2 - added errorNotification Delete pendingIntent loader and base error notification ID setter Stories library part 9.1 - added errorNotification Delete pendingIntent loader and base error notification ID setter May 30, 2020
@mzorz mzorz changed the base branch from feature/wp-stories-part91-base-notif-id to feature/wp-stories-part9-clean-todo-toast May 30, 2020 14:52
@@ -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
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// 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
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// 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

Copy link
Contributor

@jd-alexander jd-alexander left a 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 🙏

@jd-alexander jd-alexander merged commit d674f63 into feature/wp-stories-part9-clean-todo-toast Jun 21, 2020
@jd-alexander jd-alexander deleted the feature/wp-stories-part92-notif-delete-intent branch June 21, 2020 00:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants