From c8da21427137c024b0570bacd91bed1f61c4c5a4 Mon Sep 17 00:00:00 2001 From: why Date: Thu, 14 Mar 2024 18:53:57 +0800 Subject: [PATCH] [Feat]: V1.0.4 --- app/build.gradle.kts | 4 ++-- .../detail/overview/binder/OverviewSaveBinder.kt | 12 ++++++------ .../common/api/interceptor/CommonInterceptor.kt | 1 + .../common/config/glide/OkHttpProgressGlideModule.kt | 7 ------- lib-common/src/main/res/values/colors.xml | 2 +- 5 files changed, 10 insertions(+), 16 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 647ff1f8..6c600fbb 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -14,8 +14,8 @@ android { applicationId = "com.xiaoyv.bangumi" minSdk = 24 targetSdk = 34 - versionCode = 5 - versionName = "1.0.3" + versionCode = 6 + versionName = "1.0.4" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" } diff --git a/app/src/main/java/com/xiaoyv/bangumi/ui/media/detail/overview/binder/OverviewSaveBinder.kt b/app/src/main/java/com/xiaoyv/bangumi/ui/media/detail/overview/binder/OverviewSaveBinder.kt index 21267b59..a757d2b1 100644 --- a/app/src/main/java/com/xiaoyv/bangumi/ui/media/detail/overview/binder/OverviewSaveBinder.kt +++ b/app/src/main/java/com/xiaoyv/bangumi/ui/media/detail/overview/binder/OverviewSaveBinder.kt @@ -81,18 +81,18 @@ class OverviewSaveBinder(private var onSaveBtnClickListener: (AdapterTypeItem, I holder.binding.tvSave.setTextColor(ColorUtils.getColor(CommonColor.save_wish_text)) } - InterestType.TYPE_COLLECT -> { - holder.binding.tvSave.backgroundTintList = - ColorUtils.getColor(CommonColor.save_collect).tint - holder.binding.tvSave.setTextColor(ColorUtils.getColor(CommonColor.save_collect_text)) - } - InterestType.TYPE_DO -> { holder.binding.tvSave.backgroundTintList = ColorUtils.getColor(CommonColor.save_do).tint holder.binding.tvSave.setTextColor(ColorUtils.getColor(CommonColor.save_do_text)) } + InterestType.TYPE_COLLECT -> { + holder.binding.tvSave.backgroundTintList = + ColorUtils.getColor(CommonColor.save_collect).tint + holder.binding.tvSave.setTextColor(ColorUtils.getColor(CommonColor.save_collect_text)) + } + InterestType.TYPE_ON_HOLD -> { holder.binding.tvSave.backgroundTintList = ColorUtils.getColor(CommonColor.save_on_hold).tint diff --git a/lib-common/src/main/java/com/xiaoyv/common/api/interceptor/CommonInterceptor.kt b/lib-common/src/main/java/com/xiaoyv/common/api/interceptor/CommonInterceptor.kt index 70d6e3c4..bb373d7c 100644 --- a/lib-common/src/main/java/com/xiaoyv/common/api/interceptor/CommonInterceptor.kt +++ b/lib-common/src/main/java/com/xiaoyv/common/api/interceptor/CommonInterceptor.kt @@ -63,6 +63,7 @@ class CommonInterceptor : Interceptor { .addHeader("TE", "trailers") .addHeader("Accept-Language", "zh-CN,zh;q=0.8,zh-TW;q=0.6,zh-HK;q=0.4,en;q=0.2") .addHeader("User-Agent", userAgent) + .addHeader("Cookie", "kira=1") .let { if (request.header("Referer").isNullOrBlank().not() || request.isNotGet) it else it.addHeader("Referer", request.url.toString()) diff --git a/lib-common/src/main/java/com/xiaoyv/common/config/glide/OkHttpProgressGlideModule.kt b/lib-common/src/main/java/com/xiaoyv/common/config/glide/OkHttpProgressGlideModule.kt index 7dca86bd..fce50b5b 100644 --- a/lib-common/src/main/java/com/xiaoyv/common/config/glide/OkHttpProgressGlideModule.kt +++ b/lib-common/src/main/java/com/xiaoyv/common/config/glide/OkHttpProgressGlideModule.kt @@ -44,13 +44,6 @@ class OkHttpProgressGlideModule : AppGlideModule() { .newBuilder() .timeout(240) .apply { networkInterceptors().removeIf { it is HttpLoggingInterceptor } } - .addInterceptor { - it.proceed( - it.request().newBuilder() - .addHeader("Cookie", "kira=1") - .build() - ) - } .addNetworkInterceptor(createInterceptor(DispatchingProgressListener())) .build() ) diff --git a/lib-common/src/main/res/values/colors.xml b/lib-common/src/main/res/values/colors.xml index 269be2f7..e3a825e9 100644 --- a/lib-common/src/main/res/values/colors.xml +++ b/lib-common/src/main/res/values/colors.xml @@ -5,10 +5,10 @@ #F09199 @color/ui_white + #36CA36 #4897ff #9f4897ff @color/ui_white - #4897ff @color/ui_white #FF9800 @color/ui_white