Testing utilities and improved API for CacheState objects!
- Breaking Change The
deliver_()
functions inOnlineCacheState
andLocalCacheState
have been replaced with a more Kotlin like callback API with lambdas. 47 - Remove Java close compatibility. Because Kotlin and Java work nicely together, Teller may still work nicely with Java, but Teller is no longer focusing on making sure that is the case. 46
- Expose public properties to
OnlineCacheState
.
- Create code of conduct and add to the docs.
- Create set of utilities into Teller to assist in creating unit, integration, and instrumentation tests.
- Create section in docs on how to test with Teller in your app.
- Create tests in example to show examples on how to use Teller's testing utilities and to test the API as it's developed.
- Fixed bug in
OnlineCacheState
where refresh calls may not callrefreshComplete()
after a fetch finished successfully.
Changes to the API, docs, full test suite, thread safety and bug fixes.
- Breaking Change
OnlineRepository
's abstract functions have all been renamed. This is to try and be more descriptive of what Teller is doing to help developers implement faster. - Breaking Change
OnlineDataState.deliver__()
listeners has been renamed. - Breaking Change
OnlineRepository.observeCachedData()
andOnlineRepository.isDataEmpty()
gets called on UI thread.OnlineRepository.saveData()
gets called on background thread. OnlineRepository.observe()
andLocalRepository.observe()
no longerthrows
. Observe anytime you wish and receive event updates through all changes of the repository.OnlineRepository.refresh()
calls are shared between allOnlineRepository
instances. This saves on the amount of network calls performed.OnlineRepository.observe()
observers are all notified whenOnlineRepository.refresh()
actions are performed.OnlineRepository
is thread safe.- Removed
Teller.sync()
OnlineRepository
now supports observing 2+ queries, as long as it's the same type of data.- Delete Teller data for development purposes or when someone logs out of your app and the data is cleared via
Teller.clear()
. - Full test suite for unit testing and implementation testing!
- Full documentation website!
OnlineDataState
has been refactored to using a finite state machine implementation. SeeOnlineDataStateStateMachine
. It's a immutable object that represents an immutableOnlineDataState
instance.- Fetching fresh cache data and the state of the cache data have been decoupled in
OnlineDataState
. Each of these 2 different states (fetching and cache) are updated independently from each other in theOnlineRepository
so decoupling them fixes bugs that have been reported. OnlineRepository
is designed to be "useless" after.dispose()
is called. All aync tasks are cancelled or the results are ignored when they are complete. Calling any function onOnlineRepository
afterdispose()
will throw an exception.
First release of Teller!
LocalRepository
for saving and querying locally cached data.OnlineRepository
for saving, querying, and fetching remote data that is cached locally.Teller.shared.sync()
to sync a list ofOnlineRepository
instances at once.- Example Android app to show how to use Teller and, for now until tests are written, to test Teller.
- README.md documentation on status of project and how to use it.