From d4bb2ae938de54a0ab236a3b066b3f2514d3abee Mon Sep 17 00:00:00 2001 From: Jays2Kings Date: Mon, 12 Apr 2021 13:09:05 -0400 Subject: [PATCH] The 1% @CrepeTF _yoink_ --- app/build.gradle.kts | 24 +++++++++---------- .../tachiyomi/data/image/coil/CoilSetup.kt | 3 +-- .../kanade/tachiyomi/network/NetworkHelper.kt | 3 +-- .../tachiyomi/ui/library/LibraryBadge.kt | 4 ++-- .../kanade/tachiyomi/util/system/ThemeUtil.kt | 5 ++-- .../main/res/color/mtrl_btn_bg_selector.xml | 2 +- .../main/res/drawable/button_text_state.xml | 2 +- .../res/layout/rounded_category_hopper.xml | 6 ++--- .../main/res/layout/unread_download_badge.xml | 2 +- app/src/main/res/values-night/colors.xml | 14 ----------- app/src/main/res/values-night/themes.xml | 12 ++++++++++ app/src/main/res/values/colors.xml | 13 ++++++++++ app/src/main/res/values/themes.xml | 14 +---------- 13 files changed, 50 insertions(+), 54 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index a10ebcb657..87867112f9 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -141,18 +141,18 @@ dependencies { releaseImplementation("com.github.ChuckerTeam.Chucker:library-no-op:${Versions.CHUCKER}") // hyperion - debugImplementation("com.willowtreeapps.hyperion:hyperion-core:${Versions.HYPERION}") - debugImplementation("com.willowtreeapps.hyperion:hyperion-timber:${Versions.HYPERION}") - debugImplementation("com.willowtreeapps.hyperion:hyperion-core:${Versions.HYPERION}") - debugImplementation("com.willowtreeapps.hyperion:hyperion-attr:${Versions.HYPERION}") - debugImplementation("com.willowtreeapps.hyperion:hyperion-build-config:${Versions.HYPERION}") - debugImplementation("com.willowtreeapps.hyperion:hyperion-crash:${Versions.HYPERION}") - debugImplementation("com.willowtreeapps.hyperion:hyperion-disk:${Versions.HYPERION}") - debugImplementation("com.willowtreeapps.hyperion:hyperion-geiger-counter:${Versions.HYPERION}") - debugImplementation("com.willowtreeapps.hyperion:hyperion-measurement:${Versions.HYPERION}") - debugImplementation("com.willowtreeapps.hyperion:hyperion-phoenix:${Versions.HYPERION}") - debugImplementation("com.willowtreeapps.hyperion:hyperion-recorder:${Versions.HYPERION}") - debugImplementation("com.willowtreeapps.hyperion:hyperion-shared-preferences:${Versions.HYPERION}") +// debugImplementation("com.willowtreeapps.hyperion:hyperion-core:${Versions.HYPERION}") +// debugImplementation("com.willowtreeapps.hyperion:hyperion-timber:${Versions.HYPERION}") +// debugImplementation("com.willowtreeapps.hyperion:hyperion-core:${Versions.HYPERION}") +// debugImplementation("com.willowtreeapps.hyperion:hyperion-attr:${Versions.HYPERION}") +// debugImplementation("com.willowtreeapps.hyperion:hyperion-build-config:${Versions.HYPERION}") +// debugImplementation("com.willowtreeapps.hyperion:hyperion-crash:${Versions.HYPERION}") +// debugImplementation("com.willowtreeapps.hyperion:hyperion-disk:${Versions.HYPERION}") +// debugImplementation("com.willowtreeapps.hyperion:hyperion-geiger-counter:${Versions.HYPERION}") +// debugImplementation("com.willowtreeapps.hyperion:hyperion-measurement:${Versions.HYPERION}") +// debugImplementation("com.willowtreeapps.hyperion:hyperion-phoenix:${Versions.HYPERION}") +// debugImplementation("com.willowtreeapps.hyperion:hyperion-recorder:${Versions.HYPERION}") +// debugImplementation("com.willowtreeapps.hyperion:hyperion-shared-preferences:${Versions.HYPERION}") // REST implementation("com.squareup.retrofit2:retrofit:${Versions.RETROFIT}") diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/image/coil/CoilSetup.kt b/app/src/main/java/eu/kanade/tachiyomi/data/image/coil/CoilSetup.kt index a5dea33785..de5dd34ae7 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/image/coil/CoilSetup.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/image/coil/CoilSetup.kt @@ -7,7 +7,6 @@ import coil.ImageLoader import coil.decode.GifDecoder import coil.decode.ImageDecoderDecoder import coil.decode.SvgDecoder -import com.chuckerteam.chucker.api.ChuckerInterceptor import okhttp3.OkHttpClient class CoilSetup(context: Context) { @@ -28,7 +27,7 @@ class CoilSetup(context: Context) { add(ByteArrayFetcher()) }.okHttpClient { OkHttpClient.Builder() - .addInterceptor(ChuckerInterceptor(context)) +// .addInterceptor(ChuckerInterceptor(context)) .build() } .build() diff --git a/app/src/main/java/eu/kanade/tachiyomi/network/NetworkHelper.kt b/app/src/main/java/eu/kanade/tachiyomi/network/NetworkHelper.kt index c898835a1c..fad7d75ef5 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/network/NetworkHelper.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/network/NetworkHelper.kt @@ -1,7 +1,6 @@ package eu.kanade.tachiyomi.network import android.content.Context -import com.chuckerteam.chucker.api.ChuckerInterceptor import eu.kanade.tachiyomi.data.preference.PreferencesHelper import okhttp3.Cache import okhttp3.HttpUrl.Companion.toHttpUrl @@ -25,7 +24,7 @@ class NetworkHelper(context: Context) { OkHttpClient.Builder() .cookieJar(cookieManager) .cache(Cache(cacheDir, cacheSize)) - .addInterceptor(ChuckerInterceptor(context)) +// .addInterceptor(ChuckerInterceptor(context)) .apply { if (preferences.enableDoh()) { dns( diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryBadge.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryBadge.kt index 62bd52eae1..a3e2f73f85 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryBadge.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryBadge.kt @@ -39,9 +39,9 @@ class LibraryBadge @JvmOverloads constructor(context: Context, attrs: AttributeS setTextColor( // hide the badge text when preference is only show badge when { - unread == -1 && !showTotalChapters -> context.getResourceColor(R.attr.colorAccent) + unread == -1 && !showTotalChapters -> unreadBadgeBackground showTotalChapters -> context.contextCompatColor(R.color.total_badge_text) - else -> context.contextCompatColor(R.color.unread_badge_text) + else -> context.getResourceColor(R.attr.colorOnAccent) } ) setBackgroundColor(unreadBadgeBackground) diff --git a/app/src/main/java/eu/kanade/tachiyomi/util/system/ThemeUtil.kt b/app/src/main/java/eu/kanade/tachiyomi/util/system/ThemeUtil.kt index 73fb0de225..1a35ebfe55 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/util/system/ThemeUtil.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/util/system/ThemeUtil.kt @@ -43,7 +43,7 @@ object ThemeUtil { } fun isPitchBlack(context: Context, theme: Themes): Boolean { - return context.isInNightMode() && theme.styleRes == R.style.Theme_Tachiyomi_Amoled + return context.isInNightMode() && theme.darkBackground == Color.BLACK } fun hasDarkActionBarInLight(context: Context, theme: Themes): Boolean { @@ -171,8 +171,7 @@ object ThemeUtil { val darkBackground: Int = Color.parseColor( when (styleRes) { R.style.Theme_Tachiyomi_Amoled, R.style.Theme_Tachiyomi_BlackAndRed, R.style.Theme_Tachiyomi_HotPink -> "#000000" - R.style.Theme_Tachiyomi_MidnightDusk -> "#16151D" - R.style.Theme_Tachiyomi_FlatLime -> "#16151D" + R.style.Theme_Tachiyomi_MidnightDusk, R.style.Theme_Tachiyomi_FlatLime -> "#16151D" else -> "#1C1C1D" } ) diff --git a/app/src/main/res/color/mtrl_btn_bg_selector.xml b/app/src/main/res/color/mtrl_btn_bg_selector.xml index a802c7b846..d95768b695 100644 --- a/app/src/main/res/color/mtrl_btn_bg_selector.xml +++ b/app/src/main/res/color/mtrl_btn_bg_selector.xml @@ -1,6 +1,6 @@ + android:alpha="0.17" android:color="?tabBarIconInactive" /> \ No newline at end of file diff --git a/app/src/main/res/drawable/button_text_state.xml b/app/src/main/res/drawable/button_text_state.xml index d476414a3a..2ec49b4099 100644 --- a/app/src/main/res/drawable/button_text_state.xml +++ b/app/src/main/res/drawable/button_text_state.xml @@ -1,6 +1,6 @@ - + diff --git a/app/src/main/res/layout/rounded_category_hopper.xml b/app/src/main/res/layout/rounded_category_hopper.xml index 5369d5aec0..7d10bbb7c4 100644 --- a/app/src/main/res/layout/rounded_category_hopper.xml +++ b/app/src/main/res/layout/rounded_category_hopper.xml @@ -27,7 +27,7 @@ android:contentDescription="@string/previous_title" android:padding="8dp" android:src="@drawable/ic_expand_less_24dp" - app:tint="@android:color/white" + app:tint="?attr/colorOnAccent" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toStartOf="@id/category_button" app:layout_constraintStart_toStartOf="parent" @@ -41,7 +41,7 @@ android:contentDescription="@string/categories" android:padding="8dp" android:src="@drawable/ic_label_outline_24dp" - app:tint="@android:color/white" + app:tint="?attr/colorOnAccent" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toStartOf="@id/down_category" app:layout_constraintStart_toEndOf="@id/up_category" @@ -56,7 +56,7 @@ android:contentDescription="@string/next_title" android:padding="8dp" android:src="@drawable/ic_expand_more_24dp" - app:tint="@android:color/white" + app:tint="?attr/colorOnAccent" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toEndOf="@id/category_button" diff --git a/app/src/main/res/layout/unread_download_badge.xml b/app/src/main/res/layout/unread_download_badge.xml index 9b3d5e322b..ea83af61e8 100644 --- a/app/src/main/res/layout/unread_download_badge.xml +++ b/app/src/main/res/layout/unread_download_badge.xml @@ -57,7 +57,7 @@ android:maxLines="1" android:paddingStart="5dp" android:paddingEnd="5dp" - android:textColor="@color/unread_badge_text" + android:textColor="?colorOnAccent" android:textSize="13sp" android:visibility="gone" app:layout_constraintBottom_toBottomOf="@+id/download_text" diff --git a/app/src/main/res/values-night/colors.xml b/app/src/main/res/values-night/colors.xml index b06409d448..e0b89322c1 100644 --- a/app/src/main/res/values-night/colors.xml +++ b/app/src/main/res/values-night/colors.xml @@ -32,18 +32,4 @@ @color/md_white_1000 @color/md_white_1000 - - #FF3399 - - - #4AF88A - @color/md_white_1000 - @color/md_white_1000_76 - @color/md_white_1000_50 - @color/md_white_1000_20 - #202125 - #2C2D32 - #282A2E - #2C2D32 - \ No newline at end of file diff --git a/app/src/main/res/values-night/themes.xml b/app/src/main/res/values-night/themes.xml index fa29f0d674..cf5452bdb8 100644 --- a/app/src/main/res/values-night/themes.xml +++ b/app/src/main/res/values-night/themes.xml @@ -32,6 +32,18 @@ @color/colorAccentPink + \ No newline at end of file diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 438910850d..db2377b6fb 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -72,4 +72,17 @@ #DE240728 #DE4c0d4b + + #FF3399 + + + #4AF88A + @color/md_white_1000 + @color/md_white_1000_76 + @color/md_white_1000_50 + @color/md_white_1000_20 + #202125 + #2C2D32 + #282A2E + #2C2D32 diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml index 721b505cfb..e6e567fe1d 100644 --- a/app/src/main/res/values/themes.xml +++ b/app/src/main/res/values/themes.xml @@ -72,6 +72,7 @@ -