Repository navigation
Feat/sync upstream 2.1.3.1 - #174
Merged
wm-develop merged 35 commits intoSep 7, 2026
Merged
Conversation
* twk * opt: appFontWeight * update Signed-off-by: dom <githubaccount56556@proton.me> * fix appFont assert Signed-off-by: dom <githubaccount56556@proton.me> --------- Co-authored-by: dom <githubaccount56556@proton.me>
* 安卓听视频页声音会比视频页大一点 从视频播放点进听视频会新开播放器,但没带上设置里的音频输出设备,音量均衡也只在视频页生效。同一条音频流换了输出通路,听着就不一样。听视频页现在跟视频页用同一套 ao 和 loudnorm。 * fix(android): 使用 PlayInfo 响度数据进行音量均衡 * fix(android): 修正听视频响度数据回退逻辑 * update Signed-off-by: dom <githubaccount56556@proton.me> * update Signed-off-by: dom <githubaccount56556@proton.me> * update Signed-off-by: dom <githubaccount56556@proton.me> --------- Co-authored-by: dom <githubaccount56556@proton.me>
Signed-off-by: dom <githubaccount56556@proton.me>
* fix: prevent deleted accounts from being persisted * update Signed-off-by: dom <githubaccount56556@proton.me> --------- Co-authored-by: dom <githubaccount56556@proton.me>
* fix: bind response cookies to request account * update Signed-off-by: dom <githubaccount56556@proton.me> --------- Co-authored-by: dom <githubaccount56556@proton.me>
Signed-off-by: dom <githubaccount56556@proton.me>
Signed-off-by: dom <githubaccount56556@proton.me>
Signed-off-by: dom <githubaccount56556@proton.me>
* fix: bound danmaku download concurrency * update Signed-off-by: dom <githubaccount56556@proton.me> * update Signed-off-by: dom <githubaccount56556@proton.me> --------- Co-authored-by: dom <githubaccount56556@proton.me>
* 分组关注也支持排序 * refa Signed-off-by: dom <githubaccount56556@proton.me> --------- Signed-off-by: yu.hu <yu.hu@happyelements.com> Co-authored-by: dom <githubaccount56556@proton.me>
Signed-off-by: dom <githubaccount56556@proton.me>
* opt: account * tweak * fix * fix
Signed-off-by: dom <githubaccount56556@proton.me>
Signed-off-by: dom <githubaccount56556@proton.me>
* feat(comment): add minimal latex to unicode converter * feat(comment): wire latex to unicode toggle into reply input * fix(comment): drop duplicate keep-original note from engine warnings * feat(comment): complete latex to unicode converter (split glyph tables) * feat(comment): frame matrix envs with box lines * add `latex` rich type Signed-off-by: dom <githubaccount56556@proton.me> --------- Co-authored-by: dom <githubaccount56556@proton.me>
Signed-off-by: dom <githubaccount56556@proton.me>
* feat(shutdown_timer_service): 定时关闭剩余时间提示 - 视频页顶部和“定时关闭”菜单项显示剩余时间 - 音频页会显示 定时关闭剩余 xx:xx - 直播全屏头部也会显示倒计时 * opt trim live chat message Signed-off-by: dom <githubaccount56556@proton.me> * refa Signed-off-by: dom <githubaccount56556@proton.me> --------- Co-authored-by: dom <githubaccount56556@proton.me>
* fix video quality availability (bggRGjQaUbCoE#2810) * fix missing lower video quality streams * opt --------- Co-authored-by: My-Responsitories <107370289+My-Responsitories@users.noreply.github.com>
Signed-off-by: dom <githubaccount56556@proton.me>
Signed-off-by: dom <githubaccount56556@proton.me>
…ggRGjQaUbCoE#1795)" related bggRGjQaUbCoE#2781 This reverts commit 2b5f111.
Signed-off-by: dom <githubaccount56556@proton.me>
Signed-off-by: dom <githubaccount56556@proton.me>
Signed-off-by: dom <githubaccount56556@proton.me>
* Fix live danmaku blocking * update Signed-off-by: dom <githubaccount56556@proton.me> --------- Co-authored-by: dom <githubaccount56556@proton.me>
Signed-off-by: dom <githubaccount56556@proton.me>
* Impl linux webview * update Signed-off-by: dom <githubaccount56556@proton.me> --------- Co-authored-by: dom <githubaccount56556@proton.me>
Signed-off-by: dom <githubaccount56556@proton.me>
Signed-off-by: dom <githubaccount56556@proton.me>
Signed-off-by: dom <githubaccount56556@proton.me>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
跟进上游 2.1.3.1(
4d66b7b63)一、逐提交处置
828de30e9appFontWeight→appFontWeightV2的键迁移与其余零散清理;「跟随系统字重」这一档保留鸿蒙实现,见第二节5f9aa9ecfios/Runner/Info.plist,与鸿蒙无关,原样合入)03dcaa746AudioNormalizationMixin全跟;「听视频」页的player.open保持鸿蒙的Media(httpHeaders:),见第二节f0e92f2bapr_check.yml/release.yml,build.yml保持删除4b91b40016d3541dcdtest/utils/accounts/deleted_account_test.dart(本地跑过,2 passed)628031d4dadc9a4b94重写,最终态已落地)adbf6f3f5AndroidManifest.xml,原样合入)f3f59775fmodels_new/video/video_detail/video_detail_response.dart(全仓无引用)95d299d30315068bbeadc9a4b94改过一处,取最终态)c7458b1f3orderTypeto follow tag api (bggRGjQaUbCoE#2772)66d1f7d62theme字段、焦点监听替掉Listener(onPointerUp:)、各页去掉ThemeData theme形参);直播发弹幕面板整份取上游,其余保留鸿蒙骨架,见第二节adc9a4b9442b6d5933ea10b4559whisper_detail/直播顶栏部分全跟;chat_list_view.dart保持鸿蒙版,见第二节99bf57b64live_list_view.dart的构造器按 3.41 SDK 改写,见第二节5a6f3feae05cfb595drx_ext.dart里的rawValue换成value,见第二节5c7cb99b6294aa716177dcc826chasLater25ec0faa7b181b6fe1linux/目录,鸿蒙不构建,但仓库里跟踪着,跟上游同步省得每轮冲突)8a282c85eanalysis_options.yaml的lib/**/*.g.dart排除;pubspec.lock/pubspec.yaml(依赖部分)/tool/jnigen.dart/bindings.g.dart保持鸿蒙版9cc3bb2c8lib/scripts/cupertino/,鸿蒙用的是自己那套扁平的lib/scripts/*.patch,保持删除837ef862f4cc337b47live_dm_block/view.dart整份取上游,shield_rules.dart随之删除)3e6ac82e0countStr ?? '',见第二节75c83af89desktop_webview_window(鸿蒙不变量明令禁止),且只在Platform.isLinux下生效。webview/view.dart、video/note/view.dart、login_utils.dart保持鸿蒙版,新增的lib/utils/linux_cookie_manager.dart删除edf0bf203PageUtils.handleWebview去掉off形参,全仓无调用方传它)3c07a28d0pubspec.lock与 HEAD 逐字节一致edf8c55e22.1.3.1-ohos(.vscode/build_env.dart+pubspec.yaml),见第二节末4d66b7b63逐 hunk 落地核验(把每个提交新增的
lib/**.dart行去空白后在最终工作区里找):除上表标 ⛔/🟡 的以外全部 100%;标 🟡 的逐条看过,未落地的行都是下列三类之一——刻意保留的鸿蒙版、被上游后续提交又改掉的中间态(如628031d4d的bindRequestAccount、03dcaa746的私有_loudnormRegExp、4cc337b47的keywordList)、3.41 SDK 不支持的构造器写法。二、取舍说明
828de30e9 opt: appFontWeight—— 保留鸿蒙的「跟随系统字重」上游把
Pref.appFontWeight从int(-1= 不覆盖字重)改成FontWeight,存储键appFontWeight→appFontWeightV2,并把字重滑块的-1档删掉(min: 0, divisions: 8)。问题是鸿蒙这边
-1不是「不覆盖」,而是一个真功能:34bec3431 添加自定义字体后,支持字体跟随系统字重让ThemeUtils.getThemeData读HarmonyChannel.systemFontWeightScale,按区间映射到w100…w800;harmony_adapt/harmony_channel.dart里也有if (Pref.appFontWeight == -1)的分支。直接跟进会静默丢掉这一档,且已设过它的用户会被迁移成w400。处置:跟键迁移,不跟去档。
utils/storage_key.dartappFontWeightV2utils/storage_pref.dartstatic int get appFontWeight保持int,默认-1;V1→V2 迁移原样搬运-1(上游那版会把-1折成.normal)pages/setting/pages/font_setting.dartmin: -1 / divisions: 9、跟随系统标签、重置回-1、预览区-1时用.normal;保留上游新加的secondaryTrackValue(标出 w400 的位置)utils/theme_utils.dart-1走系统字重映射,fontFamily恒为FontUtils.fontFamily ?? HarmonyOS Sans,因此textTheme/tabBarTheme也一直要建)同一提交里的其余改动(
dialog.dart提取_statusItem、popup_menu.dart简化泛型、switch_item.dart去掉appFontWeight特判、rcmd/view.dart、font_utils.dart的 assert 修正、marquee.dart换flutter/widgets.dart)全跟。refresh_layout.dart鸿蒙侧早已删除(全仓无引用),上游那处返回类型收窄不跟。03dcaa746音频归一化 —— 跟 mixin,播放器调用保持鸿蒙版上游把
PlPlayerController里的归一化逻辑抽成AudioNormalizationMixin(models/common/audio_normalization.dart),顺带给「听视频」页也接上。抽取本身全跟,但pages/audio/controller.dart的两处调用鸿蒙的 media_kit fork 不支持:player.setMediaHeader(...)..open(Media(url, start:, extras:))player.open(Media(url, start:, httpHeaders:, extras:), play: _autoplayOnOpen)feat-ohos,762fdc63)没有setMediaHeader;extras挂到同一个Media上即可PlayerConfiguration(options: {...})PlayerConfiguration(ready: () async { setProperty(...) })PlayerConfiguration没有options字段;'ao': Pref.audioOutput是安卓的音频输出后端,鸿蒙不适用另外
_start == null才清position、_autoplayOnOpen这两处是鸿蒙「跨设备接续」(3e5ebb2ad)和「链路切换重算画质」(9599c0db8)的东西,保持不动。顺手修的一个鸿蒙侧 bug:
pl_player/controller.dart里归一化那段之前被f29f01beb/06675503a「切换到直播或关闭听视频后残留旧音频」那一系列改动带到了else(没有独立音频流)分支里,跟上游相反——[aid1]这个滤镜恰恰要有独立音轨才有意义。这次跟着audioFilterExtras(volume, map: extras)挪回了if分支,鸿蒙的「切回直播要清空audio-files」注释与代码留在else里。(enableAudioNormalization是Platform.isAndroid && …,鸿蒙运行时恒为 false,所以这个 bug 在鸿蒙上没有可见表现,但本仓库的安卓构建会受影响)66d1f7d62 opt publish panel—— 主体全跟,各页保留鸿蒙骨架CommonPublishPageState新增late ThemeData theme(didChangeDependencies里取)、focusNode改成带_onFocusChanged监听(取代各页Listener(onPointerUp:)里的updatePanelType(.keyboard)),子页的ThemeData theme形参全部删掉。这套全跟。各页的取舍:
live_room/send_danmaku/view.dartd529e0a2d那轮混进来的 UTF-8 BOM 去掉了video/send_danmaku/view.dart、live_emote/view.dart、common_*_pub_page.dartdynamics_create/view.dartHarmonyChannel.setShellBarsHidden、controller.keepChatPanel()/restoreChatPanel()、const ClampingScrollPhysics()(80af10073 Revert 鸿蒙ScrollPhysics跟随ios)、ContextExtensions(context).isTablet全部保留dynamics_repost/view.dartAnimatedSize+_isMax/_isExpanded骨架保留(上游那套AnimatedHeight+_expanded鸿蒙一直没跟)whisper_detail/view.dart.constraintWidth()+Align(topCenter)做限宽,不引上游的_kConstraints/ConstrainedBoxvideo/reply_new/view.dartContextExtensions(context).isTabletea10b4559/99bf57b64/05cfb595d—— 直播聊天列表chat_list_view.dart保持鸿蒙版。上游把ChatListView extends BoxScrollView改成extends ListView+super.separated(...)转发。3.41 的ListView.separated把itemBuilder/separatorBuilder/findItemIndexCallback收成普通具名形参(不是字段),required super.itemBuilder这种 super 形参用不了;3.41 也还没有scrollCacheExtent,而且上游那版依赖鸿蒙没有的sliver/sliver_constrained_cross_axis.dart(CenteredSliverConstrainedCrossAxis/maxExtent)。这次改动是纯去重,没有行为变化。live_list_view.dart跟进,构造器按 3.41 改写:把那批 super 形参展开成普通形参再显式转发给super.separated(...),去掉scrollCacheExtent。RenderLiveSliverList.performLayout与 3.41 SDK 的RenderSliverList.performLayout逐行比对过,只差addInitialChild(index: initialIndex)和被刻意删掉的「scrollOffset 归零时纠正回 index 0」那一段——正是initialIndex功能本身。rx_ext.dart的fillRangeOnly用了上游 getx fork 的rawValue;鸿蒙锁的 fork (12c9d4d15)没有这个 getter,改用value(返回的就是内部那个List,下标赋值同样不触发refresh())。live_dm_block/controller.dart里的keywordList.rawValue同理。
75c83af89 feat(linux): webview—— 不跟整个特性建立在
desktop_webview_window上(WebviewWindow.create、UserScript、dww.Webview),鸿蒙不变量里这个包是明令禁止的(和jni/jnigen同级),而且所有入口都由Platform.isLinux守卫。处置:pages/webview/view.dart、pages/video/note/view.dart、utils/login_utils.dart取鸿蒙版(其中 webview 的四处鸿蒙适配——ScaledWidgetsFlutterBinding.scaleFactor进/退页归一、SafeArea(top: false)、onDownloadStartRequest加OS.isHarmony、useHybridComposition: false——原封不动);lib/utils/linux_cookie_manager.dart删除。唯一被一起放弃的非 Linux 改动是 webview 页把菜单抽成
_actions/_handleMenuItem的重构,纯形态调整,没有行为差异。3e6ac82e0 fix #2837MainController.msgUnReadCount从RxString('')改成RxnString(null),红点判据从isNotEmpty变成!= null,并新增clearUnreadMsg()。全跟。鸿蒙侧两处跟着改:main/controller.dart:HarmonyChannel.setHomeUnreadCount(countStr)→countStr ?? ''(原生顶栏那侧的协议仍是空串表示无红点);home/controller.dart:ArkTS 顶栏私信点击回调里的..msgUnReadCount.value = ''→..clearUnreadMsg()。8a282c85e里唯一跟进的一行analysis_options.yaml加了- lib/**/*.g.dart。跟进的理由:它只压制生成文件内部的诊断,调用方引用这些文件时仍然照常分析,所以bindings.g.dart存根一旦和调用点对不上还是会报错。pubspec.lock、pubspec.yaml、tool/jnigen.dart、lib/utils/android/bindings.g.dart(这轮上游只改了一行 JNIGEN 版本注释)全部取鸿蒙版。test/目录6d3541dcd带来了仓库里第一个测试文件test/utils/accounts/deleted_account_test.dart。它是纯 Dart +hive_ce,跟平台无关,本地flutter test跑通(2 passed),所以留下了。注意鸿蒙分支的
.gitignore里有一条很宽的test*(从 Flutter 仓库模板带来的),这个文件是被合并跟踪进来的,忽略规则对已跟踪文件不生效,git clean -xfd也不会删它。附:随本轮一起提交的鸿蒙侧改动(与上游无关)
1.
lib/pages/main/view.dart—— 大屏横屏侧栏二次避让_MainAppState._sideBar之前的写法是「只在padding.left > 0时包一层Padding(left:) + MediaQuery.removePadding(removeLeft: true)」,右侧的重复避让没管。问题在于
NavigationDrawer内部那层是SafeArea(bottom: false)(见 SDKnavigation_drawer.dart),左右两侧都吃;而这两侧的避让本页早就各自让过了:build里包住整个 body 的Padding(right: _padding.right);_sideBar里这层Padding(侧栏上方的头像/消息/搜索列不在 SafeArea 内,两组控件必须一起移,否则一个右移一个不动会错位,这也是原注释在说的事)。于是右侧被让了两次。抽屉宽度是写死的
130,右边再让掉一次挖孔/手势区就只剩 100 出头,NavigationDrawerDestination的选中底色跟着变窄、标签还会被Stack裁掉——大屏横屏且右侧有挖孔/安全区时最明显,竖屏没挖孔时完全看不出来。改法:把
MediaQuery.removePadding提到left <= 0的判断之外,且removeLeft与removeRight一起置true;外层Padding(left:)仍只在left > 0时加。这样子树里不再有任何一侧的重复避让,头像/消息/搜索列与侧栏本体依旧同步左移。注释一并重写成现在的实际逻辑。三、冲突处置
git merge报 26 个文件冲突(上一轮 55 个)。分布:modify/delete).github/workflows/build.yml、lib/common/widgets/refresh_layout.dart、lib/scripts/cupertino/bottom_sheet_ios_flutter.patch、tool/jnigen.dartgit rm)pubspec.yaml、pubspec.lock、lib/utils/android/bindings.g.dart--ourslib/pages/webview/view.dart、lib/pages/video/note/view.dart--ours,另删linux_cookie_manager.dart、还原login_utils.dartlib/pages/live_dm_block/view.dart、lib/pages/live_room/send_danmaku/view.dart--theirslib/common/widgets/flutter/chat_list_view.dart--ours「无冲突 ≠ 无问题」的三处(git 自动合并成功但需要人工收尾):
lib/common/widgets/flutter/live_list_view.dart是新增文件,git 直接落盘,但里面的super.itemBuilder/scrollCacheExtent在 3.41 上编译不过;lib/utils/extension/rx_ext.dart同样是新增文件,用了 getx fork 的rawValue;lib/pages/setting/pages/font_setting.dart与lib/utils/storage_pref.dart干净合成了上游的FontWeight版本,把鸿蒙的「跟随系统」档一起吃掉了(theme_utils.dart冲突了才暴露出来)。四、下一轮注意
appFontWeight是新的长期分歧点:鸿蒙的Pref.appFontWeight返回int且保留-1(跟随系统),上游是FontWeight。font_setting.dart里的滑块段、storage_pref.dart的 getter、theme_utils.dart的字重块,以后每轮都要以鸿蒙版为基底。不变量脚本盯着这三处。chat_list_view.dart/live_list_view.dart:只要上游继续往ListView.separated的 super 形参、scrollCacheExtent、CenteredSliverConstrainedCrossAxis上走,这两个文件每轮都会冲突。固定思路是「performLayout 照抄上游,构造器按 3.41 展开」。要根治得先把sliver/sliver_constrained_cross_axis.dart和.constraintWidth()那套限宽方案统一掉。rawValue:上游 getx fork 已经有了,鸿蒙锁的12c9d4d15没有。以后再出现就继续换成value;哪天升 getx 可以一起消掉。desktop_webview_window从这轮起进入禁用清单(同jni/jnigen),webview/view.dart与video/note/view.dart成为「上游 Linux 特性未跟」的分歧点。dynamics_repost/view.dart的AnimatedSize+_isMax/_isExpanded、whisper_detail/view.dart的.constraintWidth()、msg_feed_top/*、search/view.dart、dynamics/view.dart仍是老分歧点,每轮都会在这些文件上冲突。pubspec.lock已经落后上游好几轮(上游本轮又upgrade deps两次),鸿蒙这边为了 OHOS fork 的 pin 一直不动;哪天要动得整体评估一次。lib/utils/android/bindings.g.dart存根本轮没有新方法,仍固定--ours。lib/pages/main/view.dart的_sideBar现在是鸿蒙独有的避让逻辑(上游没有HarmonyChannel.cutoutInsets这套),上游一动这个文件就会冲突,固定以鸿蒙版为基底;不变量脚本可以加一条「_sideBar里removeLeft与removeRight同时为 true」。