mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 02:34:39 +00:00
docs: Sync changelog
Also slight code adjustment
This commit is contained in:
parent
c73d0f843f
commit
9e5262140e
2 changed files with 4 additions and 3 deletions
|
@ -14,6 +14,7 @@ The format is simplified version of [Keep a Changelog](https://keepachangelog.co
|
|||
### Fixes
|
||||
- Fix sorting by latest chapter is not working properly
|
||||
- Prevent some NPE crashes
|
||||
- Fix some flickering issues when browsing sources
|
||||
|
||||
### Other
|
||||
- Update NDK to v27.2.12479018
|
||||
|
|
|
@ -758,10 +758,10 @@ open class BrowseSourceController(bundle: Bundle) :
|
|||
*
|
||||
* FIXME: Could easily be fixed by migrating to Compose.
|
||||
*/
|
||||
private fun BrowseSourceItem.subscribe(mangaFlow: Flow<Manga?>) {
|
||||
private fun BrowseSourceItem.subscribe() {
|
||||
watchJob?.cancel()
|
||||
watchJob = viewScope.launch {
|
||||
mangaFlow.collectLatest {
|
||||
getManga.subscribeByUrlAndSource(manga.url, manga.source).collectLatest {
|
||||
if (it == null) return@collectLatest
|
||||
val holder = getHolder(mangaId) ?: return@collectLatest
|
||||
updateManga(holder, it)
|
||||
|
@ -777,7 +777,7 @@ open class BrowseSourceController(bundle: Bundle) :
|
|||
*/
|
||||
override fun onItemClick(view: View?, position: Int): Boolean {
|
||||
val item = adapter?.getItem(position) as? BrowseSourceItem ?: return false
|
||||
item.subscribe(getManga.subscribeByUrlAndSource(item.manga.url, item.manga.source))
|
||||
item.subscribe()
|
||||
router.pushController(MangaDetailsController(item.manga, true).withFadeTransaction())
|
||||
lastPosition = position
|
||||
return false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue