Skip to content

Commit

Permalink
Revert "Use cache if available"
Browse files Browse the repository at this point in the history
This reverts commit 15241f9.
  • Loading branch information
imashnake0 committed Feb 27, 2024
1 parent 90087ad commit 9cb127b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class AnilistMediaRepository @Inject constructor(
seasonYear = Optional.presentIfNotNull(seasonYear)
)
)
.fetchPolicy(FetchPolicy.CacheFirst)
.fetchPolicy(FetchPolicy.CacheAndNetwork)
.toFlow()
.asResult {
it.page!!.media.orEmpty().filterNotNull().map { query -> Media.Medium(query) }
Expand All @@ -57,7 +57,7 @@ class AnilistMediaRepository @Inject constructor(
type = Optional.presentIfNotNull(mediaType)
)
)
.fetchPolicy(FetchPolicy.CacheFirst)
.fetchPolicy(FetchPolicy.CacheAndNetwork)
.toFlow()
.asResult { Media(it.media!!) }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class AnilistUserRepository @Inject constructor(
fun fetchViewer(): Flow<Result<ViewerQuery.Viewer>> {
return apolloClient
.query(ViewerQuery())
.fetchPolicy(FetchPolicy.CacheFirst)
.fetchPolicy(FetchPolicy.CacheAndNetwork)
.toFlow()
.asResult { it.viewer!! }
}
Expand Down

0 comments on commit 9cb127b

Please sign in to comment.