README corrections (#176)

This commit is contained in:
Eric 2020-05-30 19:35:16 -04:00 committed by GitHub
parent 5a4f6e47e4
commit 0afefdb0b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -57,7 +57,7 @@ Let's start by looking at what a fully configured Store looks like. We will then
StoreBuilder
.from(
fetcher = nonFlowValueFetcher { api.fetchSubreddit(it, "10").data.children.map(::toPosts) },
sourceOfTruth = SourceOfTrue.from(
sourceOfTruth = SourceOfTruth.from(
reader = db.postDao()::loadPosts,
writer = db.postDao()::insertPosts,
delete = db.postDao()::clearFeed,
@ -187,7 +187,7 @@ allows you to create offline first applications that can be used without an acti
StoreBuilder
.from(
fetcher = nonFlowValueFetcher { api.fetchSubreddit(it, "10").data.children.map(::toPosts) },
sourceOfTruth = SourceOfTrue.from(
sourceOfTruth = SourceOfTruth.from(
reader = db.postDao()::loadPosts,
writer = db.postDao()::insertPosts,
delete = db.postDao()::clearFeed,
@ -216,7 +216,7 @@ You can configure in-memory cache with the `MemoryPolicy`:
StoreBuilder
.from(
fetcher = nonFlowValueFetcher { api.fetchSubreddit(it, "10").data.children.map(::toPosts) },
sourceOfTruth = SourceOfTrue.from(
sourceOfTruth = SourceOfTruth.from(
reader = db.postDao()::loadPosts,
writer = db.postDao()::insertPosts,
delete = db.postDao()::clearFeed,
@ -268,7 +268,7 @@ When store has a sourceOfTruth, you'll need to provide the `delete` and `deleteA
StoreBuilder
.from(
fetcher = nonFlowValueFetcher { api.fetchData(key) },
sourceOfTruth = SourceOfTrue.from(
sourceOfTruth = SourceOfTruth.from(
reader = dao::loadData,
writer = dao::writeData,
delete = dao::clearDataByKey,