* Add locale to our browser state. Create an action for updating this state. * Observe changes to locale in the service and dispatch changes in the locale manager * Separate the building of the notification so it can be reused * Create a use case for local updates to be used in the locale manager Add channel id so that the existing notification can be accessed and updated Send notification id instead of tag Locale use cases test Put locale action in sealed action class Test locale scope * Add refresh functionality to the service Add locale actions and reducer for restoring state Restore state for locale use case. Make getters for ids in notification service Test locale use case notification in the locale manager Test covering all locale use cases * Add locale middleware to handle restore from disk * Middleware tests for locale * Locale action tests * Locale state reducer tests * Changelog * Lint and cleanup Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Android Components > Browser > State
🔴 Note: This is an experimental component still under development. APIs may change at any time. It's not recommended to directly use this component in products yet.
The browser-state component is responsible for maintaining the centralized state of a browser engine.
The immutable BrowserState can be accessed and observed via the BrowserStore. Apps and other components can dispatch Actions on the store in order to trigger the creation of a new BrowserState.
Patterns and concepts this component uses are heavily inspired by Redux. Therefore the Redux documentation is an excellent resource for learning about some of those concepts.
Usage
Setting up the dependency
Use Gradle to download the library from maven.mozilla.org (Setup repository):
implementation "org.mozilla.components:browser-state:{latest-version}
License
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/