Cleanup and fixes
This commit is contained in:
parent
14d6e8dd94
commit
2f203f7a1d
@ -321,7 +321,7 @@ class MangaPresenter(
|
||||
|
||||
withUIContext { view?.onFetchMangaInfoDone() }
|
||||
} catch (e: Throwable) {
|
||||
xLogE("Error getting manga details", e)
|
||||
this@MangaPresenter.xLogE("Error getting manga details", e)
|
||||
withUIContext { view?.onFetchMangaInfoError(e) }
|
||||
}
|
||||
}
|
||||
|
@ -392,16 +392,6 @@ class MangaInfoHeaderAdapter(
|
||||
// Update description TextView.
|
||||
binding.mangaSummaryText.text = updateDescription(manga.description, (fromSource || isTablet).not())
|
||||
|
||||
// SY -->
|
||||
if (manga.description == "meta") {
|
||||
binding.mangaSummaryText.text = ""
|
||||
/*binding.mangaInfoToggleLess.updateLayoutParams<ConstraintLayout.LayoutParams> {
|
||||
topToBottom = -1
|
||||
bottomToBottom = binding.mangaSummaryText.id
|
||||
}*/
|
||||
}
|
||||
// SY <--
|
||||
|
||||
// Update genres list
|
||||
if (!manga.genre.isNullOrBlank()) {
|
||||
binding.mangaGenresTagsCompactChips.setChips(
|
||||
@ -484,6 +474,9 @@ class MangaInfoHeaderAdapter(
|
||||
private fun updateDescription(description: String?, isCurrentlyExpanded: Boolean): CharSequence {
|
||||
return when {
|
||||
description.isNullOrBlank() -> view.context.getString(R.string.unknown)
|
||||
// SY -->
|
||||
description == "meta" -> ""
|
||||
// SY <--
|
||||
isCurrentlyExpanded ->
|
||||
description
|
||||
.replace(Regex(" +\$", setOf(RegexOption.MULTILINE)), "")
|
||||
|
@ -106,11 +106,11 @@ class HttpPageLoader(
|
||||
ReaderPage(index, page.url, page.imageUrl)
|
||||
}
|
||||
if (preferences.aggressivePageLoading().get()) {
|
||||
rp.mapNotNull {
|
||||
rp.forEach {
|
||||
if (it.status == Page.QUEUE) {
|
||||
PriorityPage(it, 0)
|
||||
} else null
|
||||
}.forEach { queue.offer(it) }
|
||||
queue.offer(PriorityPage(it, 0))
|
||||
}
|
||||
}
|
||||
}
|
||||
rp
|
||||
// SY <--
|
||||
|
@ -51,10 +51,12 @@ class SettingsLibraryController : SettingsController() {
|
||||
private val db: DatabaseHelper = Injekt.get()
|
||||
private val trackManager: TrackManager by injectLazy()
|
||||
|
||||
// SY -->
|
||||
/**
|
||||
* Sheet containing filter/sort/display items.
|
||||
*/
|
||||
private var settingsSheet: LibrarySettingsSheet? = null
|
||||
// SY <--
|
||||
|
||||
override fun setupPreferenceScreen(screen: PreferenceScreen) = screen.apply {
|
||||
titleRes = R.string.pref_category_library
|
||||
|
@ -71,6 +71,7 @@ class SettingsReaderController : SettingsController() {
|
||||
summaryRes = R.string.pref_show_navigation_mode_summary
|
||||
defaultValue = false
|
||||
}
|
||||
// SY -->
|
||||
switchPreference {
|
||||
key = Keys.forceHorizontalSeekbar
|
||||
titleRes = R.string.pref_force_horz_seekbar
|
||||
@ -91,6 +92,7 @@ class SettingsReaderController : SettingsController() {
|
||||
defaultValue = false
|
||||
preferences.forceHorizontalSeekbar().asImmediateFlow { isVisible = !it }.launchIn(viewScope)
|
||||
}
|
||||
// SY <--
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
switchPreference {
|
||||
key = Keys.trueColor
|
||||
@ -410,6 +412,7 @@ class SettingsReaderController : SettingsController() {
|
||||
}
|
||||
}
|
||||
|
||||
// SY -->
|
||||
preferenceCategory {
|
||||
titleRes = R.string.page_downloading
|
||||
|
||||
@ -499,7 +502,6 @@ class SettingsReaderController : SettingsController() {
|
||||
}
|
||||
}
|
||||
|
||||
// EXH -->
|
||||
preferenceCategory {
|
||||
titleRes = R.string.pref_category_fork
|
||||
|
||||
@ -550,9 +552,10 @@ class SettingsReaderController : SettingsController() {
|
||||
preferences.pageLayout().asImmediateFlow { isVisible = it != PagerConfig.PageLayout.SINGLE_PAGE }
|
||||
}
|
||||
}
|
||||
// EXH <--
|
||||
// SY <--
|
||||
}
|
||||
|
||||
// SY -->
|
||||
class ReaderBottomButtonsDialog : DialogController() {
|
||||
|
||||
private val preferences: PreferencesHelper = Injekt.get()
|
||||
@ -586,4 +589,5 @@ class SettingsReaderController : SettingsController() {
|
||||
.create()
|
||||
}
|
||||
}
|
||||
// SY <--
|
||||
}
|
||||
|
@ -123,6 +123,7 @@ class SettingsSecurityController : SettingsController() {
|
||||
titleRes = R.string.hide_notification_content
|
||||
defaultValue = false
|
||||
}
|
||||
// SY -->
|
||||
preference {
|
||||
key = "pref_edit_lock_times"
|
||||
titleRes = R.string.action_edit_biometric_lock_times
|
||||
@ -149,8 +150,10 @@ class SettingsSecurityController : SettingsController() {
|
||||
SetLockedDaysDialog().showDialog(router)
|
||||
}
|
||||
}
|
||||
// SY <--
|
||||
}
|
||||
|
||||
// SY -->
|
||||
class SetLockedDaysDialog(bundle: Bundle? = null) : DialogController(bundle) {
|
||||
val preferences: PreferencesHelper by injectLazy()
|
||||
|
||||
@ -212,4 +215,5 @@ class SettingsSecurityController : SettingsController() {
|
||||
.create()
|
||||
}
|
||||
}
|
||||
// SY <--
|
||||
}
|
||||
|
@ -1,115 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/manga_summary_section"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/manga_summary_text"
|
||||
style="@style/TextAppearance.Regular.Body1.Secondary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:maxLines="2"
|
||||
android:textIsSelectable="false"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="Collapsed summary content Collapsed summary content Collapsed summary content Collapsed summary content Collapsed summary content Collapsed summary content" />
|
||||
|
||||
<View
|
||||
android:id="@+id/manga_info_toggle_more_scrim"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/manga_info_more_gradient"
|
||||
android:backgroundTint="?android:attr/colorBackground"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/manga_summary_text"
|
||||
app:layout_constraintEnd_toStartOf="@id/manga_info_toggle_more"
|
||||
app:layout_constraintTop_toTopOf="@+id/manga_info_toggle_more" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/manga_info_toggle_more"
|
||||
style="@style/Widget.Tachiyomi.Button.InlineButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:text="@string/manga_info_expand"
|
||||
android:textAlignment="viewEnd"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/manga_summary_text"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/manga_info_toggle_less"
|
||||
style="@style/Widget.Tachiyomi.Button.InlineButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:text="@string/manga_info_collapse"
|
||||
android:textAlignment="viewEnd"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/manga_summary_text" />
|
||||
|
||||
<HorizontalScrollView
|
||||
android:id="@+id/manga_genres_tags_compact"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:requiresFadingEdge="horizontal"
|
||||
android:scrollbars="none"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/manga_summary_text">
|
||||
|
||||
<com.google.android.material.chip.ChipGroup
|
||||
android:id="@+id/manga_genres_tags_compact_chips"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingBottom="8dp"
|
||||
app:chipSpacingHorizontal="4dp"
|
||||
app:singleLine="true" />
|
||||
|
||||
</HorizontalScrollView>
|
||||
|
||||
<com.google.android.material.chip.ChipGroup
|
||||
android:id="@+id/manga_genres_tags_full_chips"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:visibility="gone"
|
||||
app:chipSpacingHorizontal="4dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/manga_info_toggle_less" />
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/genre_groups"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:visibility="gone"
|
||||
tools:listitem="@layout/manga_info_genre_grouping"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/manga_info_toggle_less"/>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -86,6 +86,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:padding="8dp"
|
||||
android:textColor="?attr/colorOnToolbar"
|
||||
android:text="@string/eh_autoscroll" />
|
||||
|
||||
<EditText
|
||||
@ -104,6 +105,7 @@
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="\?"
|
||||
android:textColor="?attr/colorOnToolbar"
|
||||
tools:ignore="HardcodedText" />
|
||||
|
||||
</LinearLayout>
|
||||
@ -120,6 +122,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textColor="?attr/colorOnToolbar"
|
||||
android:text="@string/eh_retry_all" />
|
||||
|
||||
<Button
|
||||
@ -128,6 +131,7 @@
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="\?"
|
||||
android:textColor="?attr/colorOnToolbar"
|
||||
tools:ignore="HardcodedText" />
|
||||
|
||||
<Button
|
||||
@ -136,6 +140,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textColor="?attr/colorOnToolbar"
|
||||
android:text="@string/eh_boost_page" />
|
||||
|
||||
<Button
|
||||
@ -144,6 +149,7 @@
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="\?"
|
||||
android:textColor="?attr/colorOnToolbar"
|
||||
tools:ignore="HardcodedText" />
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -54,7 +54,7 @@
|
||||
android:contentDescription="@string/action_start_reading"
|
||||
android:padding="6dp"
|
||||
android:src="@drawable/ic_start_reading_24dp"
|
||||
android:tint="@android:color/white" />
|
||||
app:tint="@android:color/white" />
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
|
@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@ -53,7 +54,7 @@
|
||||
android:contentDescription="@string/action_start_reading"
|
||||
android:padding="6dp"
|
||||
android:src="@drawable/ic_start_reading_24dp"
|
||||
android:tint="@android:color/white" />
|
||||
app:tint="@android:color/white" />
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
|
@ -30,14 +30,14 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:contentDescription="@string/action_save"
|
||||
android:tint="?attr/colorAccent"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/filter_btn"
|
||||
app:layout_constraintHorizontal_bias="1"
|
||||
app:layout_constraintStart_toEndOf="@+id/reset_btn"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_save_black_24dp" />
|
||||
app:srcCompat="@drawable/ic_save_black_24dp"
|
||||
app:tint="?attr/colorAccent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/filter_btn"
|
||||
|
Loading…
x
Reference in New Issue
Block a user