docs: Sync changelog

Also slight code adjustment
This commit is contained in:
Ahmad Ansori Palembani 2024-12-20 20:32:03 +07:00
parent c73d0f843f
commit 9e5262140e
Signed by: null2264
GPG key ID: BA64F8B60AF3EFB6
2 changed files with 4 additions and 3 deletions

View file

@ -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

View file

@ -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