Skip to content
This repository was archived by the owner on Jul 10, 2025. It is now read-only.

Conversation

mzorz
Copy link
Contributor

@mzorz mzorz commented May 26, 2020

This PR builds on top of #351

This PR adds the MetadataProvider interface so payload can be injected to the service and returned when a StorySaveResult is ready and broadcasted through EventBus.

In general, the host app may need to set some state variable values in a Bundle that it can retrieve later when a Story is finished saving. For example in WPAndroid, it may be useful to set the currently selected SiteModel the Story is supposed to be uploaded to, and as such once a SaveResult is received even if context has changed (i.e. even if the user saved a Story and then switched to work on another site), so it can properly proceed and do whatever it needs to correctly interpret the results once these are received.

To test:

  1. open the demo app
  2. add a frame and some text / emoji
  3. tap PUBLISH
  4. once it's saved, we've added a new listener with payload that shows in a toast in the demo Payload is: example metadata

…rvice and returned when a StorySaveResult is ready
@peril-automattic
Copy link

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

Base automatically changed from feature/wp-stories-part6-mediapicker-wpmedia3-intent-loader to feature/273-save-frame-service-base June 19, 2020 19:10
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 Tested it and it works well! LGTM 🚢

@jd-alexander jd-alexander merged commit 6491c63 into feature/273-save-frame-service-base Jun 19, 2020
@jd-alexander jd-alexander deleted the feature/wp-stories-part8-metadata-provider branch June 19, 2020 20:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants