-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix article location after app is closed (#841)
* Try index lookup - Fix ArticleHandler. This was resetting articles too much on launch - Fix pagerState. This needs to wait for async initialization for when the findIndex is called on the current article - Remove extra IndexedArticle handling. This caused articles to be out-of-date * Fix offset bug when page refreshes Use a coroutine job to cancel and restart finding the current index when the article count changes.
- Loading branch information
Showing
26 changed files
with
1,063 additions
and
514 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
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
58 changes: 0 additions & 58 deletions
58
app/src/main/java/com/capyreader/app/ui/articles/IndexedArticles.kt
This file was deleted.
Oops, something went wrong.
9 changes: 9 additions & 0 deletions
9
app/src/main/java/com/capyreader/app/ui/articles/LocalArticleLookup.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,9 @@ | ||
package com.capyreader.app.ui.articles | ||
|
||
import androidx.compose.runtime.compositionLocalOf | ||
|
||
val LocalArticleLookup = compositionLocalOf { ArticleLookup() } | ||
|
||
data class ArticleLookup( | ||
val findIndex: (articleID: String) -> Int = { -1 } | ||
) |
Oops, something went wrong.