Fixing reported beta bugs

This commit is contained in:
Jay 2020-02-23 16:08:00 -08:00
parent 9cea45af1d
commit 2e4d57749c
7 changed files with 22 additions and 21 deletions

View File

@ -58,7 +58,7 @@ android {
buildTypes { buildTypes {
debug { debug {
versionNameSuffix "-${getCommitCount()}" versionNameSuffix "-${getCommitCount()}"
applicationIdSuffix ".debug" applicationIdSuffix ".debugJ2K"
} }
release { release {
applicationIdSuffix = '.j2k' applicationIdSuffix = '.j2k'

View File

@ -94,6 +94,7 @@ interface Category : Serializable {
mangaSort?.plus(1) mangaSort?.plus(1)
} }
order = -1 order = -1
isFirst = true
} }
} }

View File

@ -362,22 +362,23 @@ open class LibraryController(
tabsVisibilityRelay.call(categories.size > 1) tabsVisibilityRelay.call(categories.size > 1)
if (freshStart || !justStarted) { libraryMangaRelay.call(LibraryMangaEvent(mangaMap))
// Delay the scroll position to allow the view to be properly measured.
view.post {
if (isAttached) {
activity?.tabs?.setScrollPosition(library_pager.currentItem, 0f, true)
}
}
// Send the manga map to child fragments after the adapter is updated. view.post {
libraryMangaRelay.call(LibraryMangaEvent(mangaMap)) if (isAttached) {
activity?.tabs?.setScrollPosition(library_pager.currentItem, 0f, true)
}
} }
else if (!freshStart) {
justStarted = false if (!freshStart && justStarted) {
if (pager_layout.alpha == 0f) if (!freshStart) {
pager_layout.animate().alpha(1f).setDuration(500).start() justStarted = false
if (pager_layout.alpha == 0f) pager_layout.animate().alpha(1f).setDuration(500).start()
}
} }
// Delay the scroll position to allow the view to be properly measured.
// Send the manga map to child fragments after the adapter is updated.
} }
/** /**

View File

@ -235,7 +235,7 @@ class LibraryListController(bundle: Bundle? = null) : LibraryController(bundle),
updateScroll = false updateScroll = false
return@IgnoreFirstSpinnerListener return@IgnoreFirstSpinnerListener
} }
scrollToHeader(pos - 1) scrollToHeader(presenter.categories[pos].order)
} }
} }

View File

@ -450,12 +450,12 @@ class LibraryPresenter(
libraryManga.map { manga -> libraryManga.map { manga ->
LibraryItem(manga, libraryLayout, null).apply { unreadType = unreadBadgeType } LibraryItem(manga, libraryLayout, null).apply { unreadType = unreadBadgeType }
}.groupBy { }.groupBy {
if (showCategories) it.manga.category else 0 if (showCategories) it.manga.category else -1
} }
} }
else { else {
libraryManga.groupBy { manga -> libraryManga.groupBy { manga ->
if (showCategories) manga.category else 0 if (showCategories) manga.category else -1
//LibraryItem(manga, libraryLayout).apply { unreadType = unreadBadgeType } //LibraryItem(manga, libraryLayout).apply { unreadType = unreadBadgeType }
}.map { entry -> }.map { entry ->
val categoryItem = val categoryItem =
@ -467,7 +467,7 @@ class LibraryPresenter(
).apply { unreadType = unreadBadgeType } ).apply { unreadType = unreadBadgeType }
} }
}.map { }.map {
val cat = if (showCategories) it.firstOrNull()?.manga?.category ?: 0 else 0 val cat = if (showCategories) it.firstOrNull()?.manga?.category ?: 0 else -1
cat to it cat to it
//LibraryItem(manga, libraryLayout).apply { unreadType = unreadBadgeType } //LibraryItem(manga, libraryLayout).apply { unreadType = unreadBadgeType }
}.toMap() }.toMap()

View File

@ -42,7 +42,6 @@ import eu.kanade.tachiyomi.ui.reader.viewer.pager.L2RPagerViewer
import eu.kanade.tachiyomi.ui.reader.viewer.pager.R2LPagerViewer import eu.kanade.tachiyomi.ui.reader.viewer.pager.R2LPagerViewer
import eu.kanade.tachiyomi.ui.reader.viewer.pager.VerticalPagerViewer import eu.kanade.tachiyomi.ui.reader.viewer.pager.VerticalPagerViewer
import eu.kanade.tachiyomi.ui.reader.viewer.webtoon.WebtoonViewer import eu.kanade.tachiyomi.ui.reader.viewer.webtoon.WebtoonViewer
import eu.kanade.tachiyomi.ui.security.SecureActivityDelegate
import eu.kanade.tachiyomi.util.lang.plusAssign import eu.kanade.tachiyomi.util.lang.plusAssign
import eu.kanade.tachiyomi.util.storage.getUriCompat import eu.kanade.tachiyomi.util.storage.getUriCompat
import eu.kanade.tachiyomi.util.system.GLUtil import eu.kanade.tachiyomi.util.system.GLUtil
@ -150,7 +149,7 @@ class ReaderActivity : BaseRxActivity<ReaderPresenter>(),
override fun onCreate(savedState: Bundle?) { override fun onCreate(savedState: Bundle?) {
AppCompatDelegate.setDefaultNightMode( AppCompatDelegate.setDefaultNightMode(
when (preferences.theme()) { when (preferences.theme()) {
1 -> AppCompatDelegate.MODE_NIGHT_NO 1, 8 -> AppCompatDelegate.MODE_NIGHT_NO
2, 3, 4 -> AppCompatDelegate.MODE_NIGHT_YES 2, 3, 4 -> AppCompatDelegate.MODE_NIGHT_YES
else -> AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM else -> AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM
} }

View File

@ -50,7 +50,7 @@ class SettingsGeneralController : SettingsController() {
R.string.system_theme, R.string.sysyem_white_theme, R.string.system_amoled_theme, R.string R.string.system_theme, R.string.sysyem_white_theme, R.string.system_amoled_theme, R.string
.system_darkblue_theme) .system_darkblue_theme)
entryValues = listOf(1, 8, 2, 3, 4, 5, 9, 6, 7) entryValues = listOf(1, 8, 2, 3, 4, 5, 9, 6, 7)
defaultValue = 5 defaultValue = 8
onChange { onChange {
activity?.recreate() activity?.recreate()