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 {
debug {
versionNameSuffix "-${getCommitCount()}"
applicationIdSuffix ".debug"
applicationIdSuffix ".debugJ2K"
}
release {
applicationIdSuffix = '.j2k'

View File

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

View File

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

View File

@ -450,12 +450,12 @@ class LibraryPresenter(
libraryManga.map { manga ->
LibraryItem(manga, libraryLayout, null).apply { unreadType = unreadBadgeType }
}.groupBy {
if (showCategories) it.manga.category else 0
if (showCategories) it.manga.category else -1
}
}
else {
libraryManga.groupBy { manga ->
if (showCategories) manga.category else 0
if (showCategories) manga.category else -1
//LibraryItem(manga, libraryLayout).apply { unreadType = unreadBadgeType }
}.map { entry ->
val categoryItem =
@ -467,7 +467,7 @@ class LibraryPresenter(
).apply { unreadType = unreadBadgeType }
}
}.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
//LibraryItem(manga, libraryLayout).apply { unreadType = unreadBadgeType }
}.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.VerticalPagerViewer
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.storage.getUriCompat
import eu.kanade.tachiyomi.util.system.GLUtil
@ -150,7 +149,7 @@ class ReaderActivity : BaseRxActivity<ReaderPresenter>(),
override fun onCreate(savedState: Bundle?) {
AppCompatDelegate.setDefaultNightMode(
when (preferences.theme()) {
1 -> AppCompatDelegate.MODE_NIGHT_NO
1, 8 -> AppCompatDelegate.MODE_NIGHT_NO
2, 3, 4 -> AppCompatDelegate.MODE_NIGHT_YES
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
.system_darkblue_theme)
entryValues = listOf(1, 8, 2, 3, 4, 5, 9, 6, 7)
defaultValue = 5
defaultValue = 8
onChange {
activity?.recreate()