-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix background refresh functionality
Closes #38
- Loading branch information
1 parent
ef4107a
commit 6b8b04b
Showing
5 changed files
with
38 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
...manga-list/src/main/java/com/melonhead/feature_manga_list/usecases/RefreshMangaUseCase.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.melonhead.feature_manga_list.usecases | ||
|
||
import com.melonhead.feature_manga_list.MangaRepository | ||
|
||
@Deprecated("Use UserEvent.RefreshManga event instead of using this directly") | ||
interface RefreshMangaUseCase { | ||
suspend fun invoke() | ||
} | ||
|
||
@Suppress("DEPRECATION") // This is the only valid use case of forceRefresh | ||
internal class RefreshMangaUseCaseImpl( | ||
private val mangaRepository: MangaRepository, | ||
): RefreshMangaUseCase { | ||
override suspend fun invoke() { | ||
mangaRepository.forceRefresh() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters