mirror of
https://github.com/bbara04/Purefin.git
synced 2026-03-31 17:10:08 +02:00
feat: add pull-to-refresh gesture to HomeScreen
Wrap HomeContent with PullToRefreshBox to allow refreshing library, continue watching, and next up sections by pulling down. Also fix refreshHomeData to suspend until loading completes so the refresh indicator dismisses properly.
This commit is contained in:
@@ -297,15 +297,18 @@ class InMemoryAppContentRepository @Inject constructor(
|
||||
if (!isOnline) return
|
||||
|
||||
if(loadJob?.isActive == true) {
|
||||
loadJob?.join()
|
||||
return
|
||||
}
|
||||
loadJob = scope.launch {
|
||||
val job = scope.launch {
|
||||
loadLibraries()
|
||||
loadContinueWatching()
|
||||
loadNextUp()
|
||||
loadLatestLibraryContent()
|
||||
persistHomeCache()
|
||||
}
|
||||
loadJob = job
|
||||
job.join()
|
||||
}
|
||||
|
||||
private suspend fun serverUrl(): String {
|
||||
|
||||
Reference in New Issue
Block a user