forked from github/wulkanowy-mirror
Exams and homework notification fixes (#1292)
This commit is contained in:
@ -40,8 +40,10 @@ class ExamRepository @Inject constructor(
|
||||
) = networkBoundResource(
|
||||
mutex = saveFetchResultMutex,
|
||||
shouldFetch = {
|
||||
it.isEmpty() || forceRefresh
|
||||
|| refreshHelper.isShouldBeRefreshed(getRefreshKey(cacheKey, semester, start, end))
|
||||
val isShouldBeRefreshed = refreshHelper.isShouldBeRefreshed(
|
||||
key = getRefreshKey(cacheKey, semester, start, end)
|
||||
)
|
||||
it.isEmpty() || forceRefresh || isShouldBeRefreshed
|
||||
},
|
||||
query = {
|
||||
examDb.loadAll(
|
||||
|
@ -36,8 +36,10 @@ class HomeworkRepository @Inject constructor(
|
||||
) = networkBoundResource(
|
||||
mutex = saveFetchResultMutex,
|
||||
shouldFetch = {
|
||||
it.isEmpty() || forceRefresh ||
|
||||
refreshHelper.isShouldBeRefreshed(getRefreshKey(cacheKey, semester, start, end))
|
||||
val isShouldBeRefreshed = refreshHelper.isShouldBeRefreshed(
|
||||
key = getRefreshKey(cacheKey, semester, start, end)
|
||||
)
|
||||
it.isEmpty() || forceRefresh || isShouldBeRefreshed
|
||||
},
|
||||
query = {
|
||||
homeworkDb.loadAll(
|
||||
|
Reference in New Issue
Block a user