@CrepeTF _yoink_
This commit is contained in:
Jays2Kings 2021-04-12 13:09:05 -04:00
parent d5023b1c86
commit d4bb2ae938
13 changed files with 50 additions and 54 deletions

View File

@ -141,18 +141,18 @@ dependencies {
releaseImplementation("com.github.ChuckerTeam.Chucker:library-no-op:${Versions.CHUCKER}") releaseImplementation("com.github.ChuckerTeam.Chucker:library-no-op:${Versions.CHUCKER}")
// hyperion // hyperion
debugImplementation("com.willowtreeapps.hyperion:hyperion-core:${Versions.HYPERION}") // debugImplementation("com.willowtreeapps.hyperion:hyperion-core:${Versions.HYPERION}")
debugImplementation("com.willowtreeapps.hyperion:hyperion-timber:${Versions.HYPERION}") // debugImplementation("com.willowtreeapps.hyperion:hyperion-timber:${Versions.HYPERION}")
debugImplementation("com.willowtreeapps.hyperion:hyperion-core:${Versions.HYPERION}") // debugImplementation("com.willowtreeapps.hyperion:hyperion-core:${Versions.HYPERION}")
debugImplementation("com.willowtreeapps.hyperion:hyperion-attr:${Versions.HYPERION}") // debugImplementation("com.willowtreeapps.hyperion:hyperion-attr:${Versions.HYPERION}")
debugImplementation("com.willowtreeapps.hyperion:hyperion-build-config:${Versions.HYPERION}") // debugImplementation("com.willowtreeapps.hyperion:hyperion-build-config:${Versions.HYPERION}")
debugImplementation("com.willowtreeapps.hyperion:hyperion-crash:${Versions.HYPERION}") // debugImplementation("com.willowtreeapps.hyperion:hyperion-crash:${Versions.HYPERION}")
debugImplementation("com.willowtreeapps.hyperion:hyperion-disk:${Versions.HYPERION}") // debugImplementation("com.willowtreeapps.hyperion:hyperion-disk:${Versions.HYPERION}")
debugImplementation("com.willowtreeapps.hyperion:hyperion-geiger-counter:${Versions.HYPERION}") // debugImplementation("com.willowtreeapps.hyperion:hyperion-geiger-counter:${Versions.HYPERION}")
debugImplementation("com.willowtreeapps.hyperion:hyperion-measurement:${Versions.HYPERION}") // debugImplementation("com.willowtreeapps.hyperion:hyperion-measurement:${Versions.HYPERION}")
debugImplementation("com.willowtreeapps.hyperion:hyperion-phoenix:${Versions.HYPERION}") // debugImplementation("com.willowtreeapps.hyperion:hyperion-phoenix:${Versions.HYPERION}")
debugImplementation("com.willowtreeapps.hyperion:hyperion-recorder:${Versions.HYPERION}") // debugImplementation("com.willowtreeapps.hyperion:hyperion-recorder:${Versions.HYPERION}")
debugImplementation("com.willowtreeapps.hyperion:hyperion-shared-preferences:${Versions.HYPERION}") // debugImplementation("com.willowtreeapps.hyperion:hyperion-shared-preferences:${Versions.HYPERION}")
// REST // REST
implementation("com.squareup.retrofit2:retrofit:${Versions.RETROFIT}") implementation("com.squareup.retrofit2:retrofit:${Versions.RETROFIT}")

View File

@ -7,7 +7,6 @@ import coil.ImageLoader
import coil.decode.GifDecoder import coil.decode.GifDecoder
import coil.decode.ImageDecoderDecoder import coil.decode.ImageDecoderDecoder
import coil.decode.SvgDecoder import coil.decode.SvgDecoder
import com.chuckerteam.chucker.api.ChuckerInterceptor
import okhttp3.OkHttpClient import okhttp3.OkHttpClient
class CoilSetup(context: Context) { class CoilSetup(context: Context) {
@ -28,7 +27,7 @@ class CoilSetup(context: Context) {
add(ByteArrayFetcher()) add(ByteArrayFetcher())
}.okHttpClient { }.okHttpClient {
OkHttpClient.Builder() OkHttpClient.Builder()
.addInterceptor(ChuckerInterceptor(context)) // .addInterceptor(ChuckerInterceptor(context))
.build() .build()
} }
.build() .build()

View File

@ -1,7 +1,6 @@
package eu.kanade.tachiyomi.network package eu.kanade.tachiyomi.network
import android.content.Context import android.content.Context
import com.chuckerteam.chucker.api.ChuckerInterceptor
import eu.kanade.tachiyomi.data.preference.PreferencesHelper import eu.kanade.tachiyomi.data.preference.PreferencesHelper
import okhttp3.Cache import okhttp3.Cache
import okhttp3.HttpUrl.Companion.toHttpUrl import okhttp3.HttpUrl.Companion.toHttpUrl
@ -25,7 +24,7 @@ class NetworkHelper(context: Context) {
OkHttpClient.Builder() OkHttpClient.Builder()
.cookieJar(cookieManager) .cookieJar(cookieManager)
.cache(Cache(cacheDir, cacheSize)) .cache(Cache(cacheDir, cacheSize))
.addInterceptor(ChuckerInterceptor(context)) // .addInterceptor(ChuckerInterceptor(context))
.apply { .apply {
if (preferences.enableDoh()) { if (preferences.enableDoh()) {
dns( dns(

View File

@ -39,9 +39,9 @@ class LibraryBadge @JvmOverloads constructor(context: Context, attrs: AttributeS
setTextColor( setTextColor(
// hide the badge text when preference is only show badge // hide the badge text when preference is only show badge
when { when {
unread == -1 && !showTotalChapters -> context.getResourceColor(R.attr.colorAccent) unread == -1 && !showTotalChapters -> unreadBadgeBackground
showTotalChapters -> context.contextCompatColor(R.color.total_badge_text) showTotalChapters -> context.contextCompatColor(R.color.total_badge_text)
else -> context.contextCompatColor(R.color.unread_badge_text) else -> context.getResourceColor(R.attr.colorOnAccent)
} }
) )
setBackgroundColor(unreadBadgeBackground) setBackgroundColor(unreadBadgeBackground)

View File

@ -43,7 +43,7 @@ object ThemeUtil {
} }
fun isPitchBlack(context: Context, theme: Themes): Boolean { 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 { fun hasDarkActionBarInLight(context: Context, theme: Themes): Boolean {
@ -171,8 +171,7 @@ object ThemeUtil {
val darkBackground: Int = Color.parseColor( val darkBackground: Int = Color.parseColor(
when (styleRes) { when (styleRes) {
R.style.Theme_Tachiyomi_Amoled, R.style.Theme_Tachiyomi_BlackAndRed, R.style.Theme_Tachiyomi_HotPink -> "#000000" 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_MidnightDusk, R.style.Theme_Tachiyomi_FlatLime -> "#16151D"
R.style.Theme_Tachiyomi_FlatLime -> "#16151D"
else -> "#1C1C1D" else -> "#1C1C1D"
} }
) )

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false" <item android:state_enabled="false"
android:alpha="0.12" android:color="?attr/colorOnSurface" /> android:alpha="0.17" android:color="?tabBarIconInactive" />
<item android:color="?colorAccent" /> <item android:color="?colorAccent" />
</selector> </selector>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_activated="true" android:color="@color/md_white_1000"> <item android:state_activated="true" android:color="?colorOnAccent">
<shape android:shape="rectangle"> <shape android:shape="rectangle">
<corners android:radius="2dp" /> <corners android:radius="2dp" />
<solid android:color="?attr/colorAccent" /> <solid android:color="?attr/colorAccent" />

View File

@ -27,7 +27,7 @@
android:contentDescription="@string/previous_title" android:contentDescription="@string/previous_title"
android:padding="8dp" android:padding="8dp"
android:src="@drawable/ic_expand_less_24dp" android:src="@drawable/ic_expand_less_24dp"
app:tint="@android:color/white" app:tint="?attr/colorOnAccent"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/category_button" app:layout_constraintEnd_toStartOf="@id/category_button"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
@ -41,7 +41,7 @@
android:contentDescription="@string/categories" android:contentDescription="@string/categories"
android:padding="8dp" android:padding="8dp"
android:src="@drawable/ic_label_outline_24dp" android:src="@drawable/ic_label_outline_24dp"
app:tint="@android:color/white" app:tint="?attr/colorOnAccent"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/down_category" app:layout_constraintEnd_toStartOf="@id/down_category"
app:layout_constraintStart_toEndOf="@id/up_category" app:layout_constraintStart_toEndOf="@id/up_category"
@ -56,7 +56,7 @@
android:contentDescription="@string/next_title" android:contentDescription="@string/next_title"
android:padding="8dp" android:padding="8dp"
android:src="@drawable/ic_expand_more_24dp" android:src="@drawable/ic_expand_more_24dp"
app:tint="@android:color/white" app:tint="?attr/colorOnAccent"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/category_button" app:layout_constraintStart_toEndOf="@id/category_button"

View File

@ -57,7 +57,7 @@
android:maxLines="1" android:maxLines="1"
android:paddingStart="5dp" android:paddingStart="5dp"
android:paddingEnd="5dp" android:paddingEnd="5dp"
android:textColor="@color/unread_badge_text" android:textColor="?colorOnAccent"
android:textSize="13sp" android:textSize="13sp"
android:visibility="gone" android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@+id/download_text" app:layout_constraintBottom_toBottomOf="@+id/download_text"

View File

@ -32,18 +32,4 @@
<color name="textPrimaryDuskDawn">@color/md_white_1000</color> <color name="textPrimaryDuskDawn">@color/md_white_1000</color>
<color name="appBarTextDuskDawn">@color/md_white_1000</color> <color name="appBarTextDuskDawn">@color/md_white_1000</color>
<!-- Hot Pink Theme -->
<color name="colorAccentPink">#FF3399</color>
<!-- Flat Lime Theme -->
<color name="colorAccentLime">#4AF88A</color>
<color name="textColorPrimaryLime">@color/md_white_1000</color>
<color name="textColorSecondaryLime">@color/md_white_1000_76</color>
<color name="textColorHintLime">@color/md_white_1000_50</color>
<color name="rippleColorLime">@color/md_white_1000_20</color>
<color name="backgroundLime">#202125</color>
<color name="colorAccentLimeText">#2C2D32</color>
<color name="dialogLime">#282A2E</color>
<color name="colorOnLime">#2C2D32</color>
</resources> </resources>

View File

@ -32,6 +32,18 @@
<item name="colorAccentText">@color/colorAccentPink</item> <item name="colorAccentText">@color/colorAccentPink</item>
</style> </style>
<style name="Theme.Tachiyomi.FlatLime" parent="Theme.Tachiyomi">
<item name="colorPrimary">@color/backgroundLime</item>
<item name="colorPrimaryDark">@color/backgroundLime</item>
<item name="colorAccent">@color/colorAccentLime</item>
<item name="colorAccentText">@color/colorAccentLime</item>
<item name="colorPrimaryVariant">@color/dialogLime</item>
<item name="colorSecondary">@color/backgroundLime</item>
<item name="background">@color/backgroundLime</item>
<item name="android:colorBackground">@color/backgroundLime</item>
<item name="colorSurface">@color/colorAccentLimeText</item>
<item name="colorOnAccent">@color/colorOnLime</item>
</style>
</resources> </resources>

View File

@ -72,4 +72,17 @@
<color name="textPrimaryDuskDawn">#DE240728</color> <color name="textPrimaryDuskDawn">#DE240728</color>
<color name="appBarTextDuskDawn">#DE4c0d4b</color> <color name="appBarTextDuskDawn">#DE4c0d4b</color>
<!-- Hot Pink Theme -->
<color name="colorAccentPink">#FF3399</color>
<!-- Flat Lime Theme -->
<color name="colorAccentLime">#4AF88A</color>
<color name="textColorPrimaryLime">@color/md_white_1000</color>
<color name="textColorSecondaryLime">@color/md_white_1000_76</color>
<color name="textColorHintLime">@color/md_white_1000_50</color>
<color name="rippleColorLime">@color/md_white_1000_20</color>
<color name="backgroundLime">#202125</color>
<color name="colorAccentLimeText">#2C2D32</color>
<color name="dialogLime">#282A2E</color>
<color name="colorOnLime">#2C2D32</color>
</resources> </resources>

View File

@ -72,6 +72,7 @@
<style name="Theme.Tachiyomi.Amoled" parent="Theme.Tachiyomi"/> <style name="Theme.Tachiyomi.Amoled" parent="Theme.Tachiyomi"/>
<style name="Theme.Tachiyomi.BlackAndRed" parent="Theme.Tachiyomi.Amoled"/> <style name="Theme.Tachiyomi.BlackAndRed" parent="Theme.Tachiyomi.Amoled"/>
<style name="Theme.Tachiyomi.HotPink" parent="Theme.Tachiyomi.Amoled"/> <style name="Theme.Tachiyomi.HotPink" parent="Theme.Tachiyomi.Amoled"/>
<style name="Theme.Tachiyomi.FlatLime" parent="Theme.Tachiyomi"/>
<style name="Theme.Tachiyomi.MidnightDusk" parent="Theme.Tachiyomi"> <style name="Theme.Tachiyomi.MidnightDusk" parent="Theme.Tachiyomi">
<item name="colorPrimary">@color/dialogDuskDawn</item> <item name="colorPrimary">@color/dialogDuskDawn</item>
<item name="colorPrimaryDark">@color/dialogDuskDawn</item> <item name="colorPrimaryDark">@color/dialogDuskDawn</item>
@ -84,19 +85,6 @@
<item name="android:colorBackground">@color/backgroundDuskDawn</item> <item name="android:colorBackground">@color/backgroundDuskDawn</item>
<item name="actionBarTintColor">@color/appBarTextDuskDawn</item> <item name="actionBarTintColor">@color/appBarTextDuskDawn</item>
</style> </style>
<style name="Theme.Tachiyomi.FlatLime" parent="Theme.Tachiyomi">
<item name="colorPrimary">@color/backgroundLime</item>
<item name="colorPrimaryDark">@color/backgroundLime</item>
<item name="colorAccent">@color/colorAccentLime</item>
<item name="colorAccentText">@color/colorAccentLime</item>
<item name="colorPrimaryVariant">@color/dialogLime</item>
<item name="colorSecondary">@color/backgroundLime</item>
<item name="background">@color/backgroundLime</item>
<item name="android:colorBackground">@color/backgroundLime</item>
<item name="colorOnSurface">@color/colorAccentLimeText</item>
<item name="colorOnAccent">@color/colorOnLime</item>
</style>
<!--===============--> <!--===============-->