From c4a75d5b5b90574ef023a7e046c51a6b60ca36ba Mon Sep 17 00:00:00 2001 From: PathGao <42336971+PathGao@users.noreply.github.com> Date: Sat, 3 Oct 2026 21:27:44 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=B8=85=E7=90=86=E9=81=AE=E6=8C=A1?= =?UTF-8?q?=E6=8A=BD=E7=A6=BB=E5=90=8E=E7=9A=84=E6=AE=8B=E7=95=99=E4=B8=8E?= =?UTF-8?q?=E8=AF=8A=E6=96=AD=E9=A1=B5=E5=B0=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 删掉 RealFeedController 只转发的 removeMasks、诊断页未用 import 和重复的 dp 公式;minSdk 30 下 mipmap-anydpi-v26 改为 mipmap-anydpi;统计说明改为真实应用实验筛选不计入话题。 --- .../java/io/github/pathgao/housheng/RealFeedController.kt | 5 ++--- .../java/io/github/pathgao/housheng/DiagnosticsActivity.kt | 5 ++--- .../res/{mipmap-anydpi-v26 => mipmap-anydpi}/ic_launcher.xml | 0 3 files changed, 4 insertions(+), 6 deletions(-) rename app/src/main/res/{mipmap-anydpi-v26 => mipmap-anydpi}/ic_launcher.xml (100%) diff --git a/app/src/debug/java/io/github/pathgao/housheng/RealFeedController.kt b/app/src/debug/java/io/github/pathgao/housheng/RealFeedController.kt index ffa533b..76046d1 100644 --- a/app/src/debug/java/io/github/pathgao/housheng/RealFeedController.kt +++ b/app/src/debug/java/io/github/pathgao/housheng/RealFeedController.kt @@ -63,7 +63,7 @@ internal class RealFeedController(private val service: FeedService) { } val cards = readFeed(root) if (cards == current && pkg == source) return true - removeMasks() + masks.clear() source = pkg current = cards pending = cards @@ -117,7 +117,6 @@ internal class RealFeedController(private val service: FeedService) { } } - private fun removeMasks() = masks.clear() - fun clear() { refresh?.let(main::removeCallbacks); refresh = null; generation++; current = emptyList(); pending = emptyList(); removeMasks() } + fun clear() { refresh?.let(main::removeCallbacks); refresh = null; generation++; current = emptyList(); pending = emptyList(); masks.clear() } fun close() { closed = true; clear(); answers.clear(); revealed.clear(); worker.shutdownNow(); masks.close() } } diff --git a/app/src/main/java/io/github/pathgao/housheng/DiagnosticsActivity.kt b/app/src/main/java/io/github/pathgao/housheng/DiagnosticsActivity.kt index 6592040..a5808d0 100644 --- a/app/src/main/java/io/github/pathgao/housheng/DiagnosticsActivity.kt +++ b/app/src/main/java/io/github/pathgao/housheng/DiagnosticsActivity.kt @@ -7,7 +7,6 @@ import android.graphics.BitmapFactory import android.os.Bundle import android.provider.Settings import android.text.InputFilter -import android.view.View import android.widget.* import java.io.File @@ -20,7 +19,7 @@ class DiagnosticsActivity : Activity() { private lateinit var feedSwitch: Switch private var updatingSwitches = false private val preferences by lazy { Preferences(this) } - private fun dp(value: Int) = (value * resources.displayMetrics.density).toInt() + private fun dp(value: Int) = ProductUi.dp(this, value) override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) @@ -35,7 +34,7 @@ class DiagnosticsActivity : Activity() { return "观察到 ${counts.values.sum()} 次内容展示\n" + counts.entries.joinToString("\n") { "${it.key.label}:${it.value}次" } } AlertDialog.Builder(this).setTitle("本次信息流统计") - .setMessage("真实应用\n${counts(false)}\n\n验证场(不计入父母统计)\n${counts(true)}\n\n模型仅返回保留、过滤或不确定,不输出话题,内容记为未分类。小红书实验筛选暂不计入话题统计。次数表示观察到的展示,不代表观看时长。仅保存在本次进程,清空记录或进程结束后清除。") + .setMessage("真实应用\n${counts(false)}\n\n验证场(不计入父母统计)\n${counts(true)}\n\n模型仅返回保留、过滤或不确定,不输出话题,内容记为未分类。真实应用实验筛选暂不计入话题统计。次数表示观察到的展示,不代表观看时长。仅保存在本次进程,清空记录或进程结束后清除。") .setPositiveButton("关闭", null).show() } status = label("", Type.SUPPORT) diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app/src/main/res/mipmap-anydpi/ic_launcher.xml similarity index 100% rename from app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml rename to app/src/main/res/mipmap-anydpi/ic_launcher.xml From d545ca3e1840fafd718568b1e27dd0652ad5759f Mon Sep 17 00:00:00 2001 From: PathGao <42336971+PathGao@users.noreply.github.com> Date: Sat, 3 Oct 2026 21:28:18 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=9B=BE=E6=A0=87=E8=AF=B4=E6=98=8E?= =?UTF-8?q?=E5=90=8C=E6=AD=A5=E8=B5=84=E6=BA=90=E7=9B=AE=E5=BD=95=E6=94=B9?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- design/icon/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/design/icon/README.md b/design/icon/README.md index 68cbe04..f061fe5 100644 --- a/design/icon/README.md +++ b/design/icon/README.md @@ -4,7 +4,7 @@ ![后生](../../app/src/main/res/drawable-nodpi/ic_housheng.png) -原稿即 Android 使用的 PNG,只有一份。自适应图标通过原生 Drawable 留出裁切边距,不重绘原图,不预切圆角。前景与背景配置见 `app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml`。 +原稿即 Android 使用的 PNG,只有一份。自适应图标通过原生 Drawable 留出裁切边距,不重绘原图,不预切圆角。前景与背景配置见 `app/src/main/res/mipmap-anydpi/ic_launcher.xml`。 `housheng-rounded.png`(512×512,圆角半径 22.37%,透明角)只用于 README 和商店展示。启动器图标仍走自适应图标,圆角由系统裁切。