Repository navigation
Feat/sync upstream 2.1.2.3 - #173
Merged
wm-develop merged 41 commits intoAug 31, 2026
Merged
Conversation
Signed-off-by: dom <githubaccount56556@proton.me>
Closes bggRGjQaUbCoE#2692 Signed-off-by: dom <githubaccount56556@proton.me>
Closes bggRGjQaUbCoE#2671 Signed-off-by: dom <githubaccount56556@proton.me>
Signed-off-by: dom <githubaccount56556@proton.me>
Signed-off-by: dom <githubaccount56556@proton.me>
ref BiliRoamingX Signed-off-by: dom <githubaccount56556@proton.me>
add web report btn Closes bggRGjQaUbCoE#2647 Signed-off-by: dom <githubaccount56556@proton.me>
- Add stream-lavf-o=reconnect=1 to enable HTTP stream reconnection on connection drops - Auto-refresh player on NAL corruption errors (Invalid NAL unit size, Error splitting NAL, Stream ends prematurely) with 5s throttle, preventing permanent playback stall Co-authored-by: Alin Jiang <zonglinj@amazon.com>
Signed-off-by: dom <githubaccount56556@proton.me>
Signed-off-by: dom <githubaccount56556@proton.me>
Closes bggRGjQaUbCoE#2716 Signed-off-by: dom <githubaccount56556@proton.me>
* opt: webview * fix: android webview anim * fix patch Signed-off-by: dom <githubaccount56556@proton.me> --------- Co-authored-by: dom <githubaccount56556@proton.me>
Signed-off-by: dom <githubaccount56556@proton.me>
Closes bggRGjQaUbCoE#2717 Signed-off-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>
Signed-off-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>
Signed-off-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>
Signed-off-by: dom <githubaccount56556@proton.me>
* refa: font setting * update Signed-off-by: dom <githubaccount56556@proton.me> * fix remove font [skip ci] Signed-off-by: dom <githubaccount56556@proton.me> * tweaks [skip ci] 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>
* opt: anonymity doc * twk * fix: debug route * opt: logout * twk * opt: avoid closure * opt: sliver wrap * twk * twk * opt: onCheckReply * opt: SliverPrototypeExtentList * opt: SliverSingleChildDelegate * twk
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.
Feat/sync upstream 2.1.2.3(
44680b8a4)一、逐提交处置
61c65a65c06b88943c的$1→$2修正62bdcafa1downloaded += count→=)d2b2f5c9d299905f47style_settings.dart里鸿蒙的ThemeUtils.syncColorModeToNative()已挪进新的_setThemeType)6413631c0label/label2/text→desc/descShort/label)6c6b8dd7ehttp2https)ddd46dfd4一起落地)b819ad8983e8a79446bindings.g.dart鸿蒙存根补一个空的updateDocProvider(bool),安卓原生文件原样合入66c9c339d9b9791cf3(bool))226bd3bb7clearError()保持鸿蒙的validate()——3.41 的FormFieldState没有clearErrorb71474d09/2c3cc3b88f40cab0a5bccsubtitle ext35e5454a4ed78bee1fd7552cad832a39e466pubspec.lock与 HEAD 逐字节一致49356bf73ddd46dfd4198261f51image_save.dart结构上手工加入else分支)dde09d91ad529e0a2dea67b9313Platform.isWindows专用,且鸿蒙main/view.dart没有_hide/_show这套结构44354d7fa.fvmrc/environment不动76feace34fontFamily/fontWeight、tooltip 背景改const Color(0xE6616161);字重跟随系统、无自定义字体时回落 HarmonyOS Sans 的鸿蒙逻辑整段保留797f1545337ae9cf2d9058ac1446ee11d3921f43c60d8db77169b44667f5f53932b95ccbdb77169b4+ 后续三个修正);font_setting.dart与上游逐字节一致,font_utils.dart只做文件选择器适配,见第二节85803c196lib/scripts/保持鸿蒙版4da8110809624c3725SliverSingleChildDelegate、logout返回LoadingState、搜索历史去重、SliverFixedWrap重构…);未取的部分见第二节06b88943cadb65993844680b8a4逐 hunk 落地核验(把每个提交的新增行去空白后在最终工作区里找):除上表标 ⛔/🟡 的以外全部 100%;标 🟡 的逐条看过,未落地的行都是下列三类之一——刻意保留的鸿蒙版、被上游后续提交又改掉的中间态(如
label2、replyReply(item, id))、安卓 JNI 绑定。二、取舍说明
自定义字体导入(
797f15453起 8 个提交)——跟进,鸿蒙只适配文件选择器上游把字体页从「系统字体下拉框」改成「列表 + 导入本地 ttf/ttc/otf」:选中的字体文件存为
<appSupportDir>/customFont.otf,启动时FontUtils.init()用dart:ui loadFontFromList注册,字体族名形如<时间戳>/<文件名>(含/即视为自定义),Pref.appFont挪进FontUtils.appFont。这套实现与平台无关,鸿蒙上可用,处置:pages/setting/pages/font_setting.dart4667f5f53保存逻辑修正、932b95ccb默认字重预览、37ae9cf2d已无下拉框)utils/font_utils.dartfile_picker12 的静态FilePicker.pickFiles()+PlatformFile.readAsBytes(),鸿蒙 forkfile_picker_ohos10.3.8 只有FilePicker.platform.pickFiles(type: FileType.custom, allowedExtensions:…, allowMultiple: true)返回FilePickerResult,改为result.files+file.xFile.readAsBytes()(字幕导入已在用同一条路径)。getFont()保留鸿蒙的「只在 Linux 枚举失败时提示」utils/theme_utils.dartFontUtils.fontFamily ?? (useBuiltInFont ? "HarmonyOS_Sans" : "HarmonyOS Sans")——未导入字体时行为与改动前一致;字重跟随系统的逻辑不动utils/storage_pref.dartPref.appFont(全仓已无引用)main.dartFuture.wait([...])里加?FontUtils.init();appSupportDirPath在此之前由_initAppPath()初始化,与上游顺序相同鸿蒙上
getFont()仍返回空集合,所以字体页的列表只有「默认」+ 已导入的自定义字体,系统字体那一段不会出现。下一轮注意:上游
828de30e9 opt: appFontWeight (#2787)(已在 2.1.2.3 之后)会碰theme_utils.dart的字重逻辑,到时以鸿蒙版为基底、沿本节的对应关系合并。ddd46dfd4 opt: webview—— 全跟,但鸿蒙 4 处适配重新套上上游把
_WebviewPageState重写(RouteAware、_isPop时卸掉 WebView、去掉userAgent构造参数、_title/_progress私有化),git 在这个文件上报了 4 个冲突且其中一个是「上游整段挪位、鸿蒙侧原文」的假冲突。处置是整份取上游版,再把鸿蒙的私货逐条加回:ScaledWidgetsFlutterBinding.scaleFactor进页置 1.0、退页还原SafeArea(top: false)onDownloadStartRequest: Platform.isAndroid || OS.isHarmonyuseHybridComposition: false(上游本轮改成了true)flutter_inappwebview_ohos的FlutterWebView.ets会读取这个值(第 158/165/172 行三处!customSettings.useHybridComposition分支),改true会改变鸿蒙侧行为。geetest_webview_dialog.dart里同一处也一并保持false,两处都加了注释全仓没有调用方给
WebviewPage传userAgent:(grep确认),去掉该参数无影响。上游给
WebviewPage加的RouteAware订阅只在Platform.isAndroid下生效,鸿蒙无副作用。9624c3725 tweaks—— 未取的部分sliver_wrap.dartrequired this._mainAxisExtent/this._spacing构造写法spacing/runSpacing转存写法,其余重构(去掉SliverWrapElement、updateRenderObject里markRowsDirty()、_Row精简)全部落地dynamics/view.dartThemeData theme→ColorScheme colorScheme改名,PreferredSize + Row顶栏AppBar(primary: true)避让安全区、actions是 List、发布按钮多包一层Center,整份保持鸿蒙版msg_feed_top/{at_me,like_detail,like_me,reply_me,sys_msg}switch改语句式opt ui耦合(sys_msg的SliverSafeArea(top:false,bottom:false)也来自6cb8a8e06 opt ui);只把骨架屏那一小段改成SliverPrototypeExtentList + SliverSingleChildDelegate,其余保持鸿蒙版search/view.dartViewInsetsSafeArea包一层6cb8a8e06 opt ui,鸿蒙未跟;只取trending != null || rcmd != null那一处条件pl_player/controller.dartif (videoPlayerController case NativePlayer(:final state))enterPip签名(Future<PiPStatus> enterPip({bool isAuto})+ 横屏小窗拦截)与上游完全不同,保持鸿蒙版publish_route.dartfinal字段覆写transitionDuration改成可空并按PlatformUtils.isDesktop取 400/500mscommon_dyn_page.dart/match_info/view.dartreplyReply(item, id)adb659938改回(context, item, id),最终态已落地299905f47/226bd3bb7里的两处小替换report.dart:上游先用static ReasonCheck x = (...)闭包,tweaks又改成静态函数,最终态(静态函数)已落地;updateReasonType里的key.currentState?.clearError()保持鸿蒙侧此前的validate()(3.41 无clearError)。storage_key.dart:鸿蒙自己的fullScreenModeMigrated与上游新增的enableDocProvider取并集。三、冲突处置与「无冲突 ≠ 无问题」
git merge报 55 个文件冲突,绝大多数是d529e0a2d的 import 重排撞上鸿蒙侧多出的 import(os_type、harmony_adapt、scale_app…)。处理方式:.fvmrc、selectable_region.patch、bindings.g.dart、pubspec.lock固定取鸿蒙侧(font_utils.dart先取鸿蒙侧,再按第二节重写);text_field/*.dart(上游把material_uiimport 挪出冲突块,导致AdaptiveTextSelectionToolbar二义、HardwareKeyboard等未定义)、dynamics/view.dart(上游在冲突块外把theme改名colorScheme)、五个msg_feed_top页面(冲突块只覆盖 switch 头部,头尾风格错配);live_room/view.dart、extra_settings.dart、video/view.dart各多出一条重复 import (material_ui裸 import 与hide PageView版并存等),已清掉。语义丢失行扫描(鸿蒙 HEAD 有、合并结果整份文件找不到的行):62 个文件 395 行,用鸿蒙关键字(
isHarmony/HarmonyChannel/鸿蒙/ohos/Hds/ScaledWidgetsFlutterBinding/ExtendedVisibilityDetector/finishAutofillContext/syncColorModeToNative)扫描命中 0;逐文件看过,全是上游本轮的重构替换(sliver_wrap33 行、save_panel29 行、webview29 行、setting/view.dart28 行…)。不变量校验(
check_invariants.py,本轮重建,14 项全绿):TargetPlatform.ohospackage:file_picker/.fvmrc与 pubspecExtendedVisibilityDetector6/6flutter/page/page_view4/4flutter/page/tabs4/4useHybridComposition: false×2、updateDocProvider存根、FontUtils.fontFamily ??回落、FilePicker.platform.pickFiles、?FontUtils.init())四、真机重点
ddd46dfd4重写了页面骨架——确认缩放比例非 1.0 时触摸不漂移、平板顶部无多余留白、下载确认弹窗还在、返回后 WebView 正常销毁不黑屏。syncColorModeToNative挪位后的验证点)。所选账号均退出登录失败/账号 x,y 退出登录失败)。SliverFixedWrap(用到的地方:标签/热搜之类的 Wrap 列表)滚动、resize 后不错位。<appSupportDir>/customFont.otf生成;杀掉重开字体仍在(走FontUtils.init());再选「默认」确定后文件被删、回到 HarmonyOS Sans;导入非法/损坏的字体文件不应崩(_loadFont吞异常,只是不生效);横屏时页面是左右分栏。字重/字号仍可调,字重「默认」仍跟随系统。五、下一轮注意
main已在 2.1.2.3 之后多了828de30e9 opt: appFontWeight (#2787),会碰theme_utils.dart字重逻辑,以鸿蒙版为基底。font_setting.dart现在与上游一致,以后可以直接取上游;font_utils.dart上游每动一次都要重做第二节那一处FilePicker.platform适配。useHybridComposition现在是鸿蒙有意与上游不一致的点(两处),已加注释;不变量脚本会盯着它。msg_feed_top/*、search/view.dart、dynamics/view.dart仍是「上游 opt ui 未跟」的长期分歧点,每轮都会在这些文件上冲突,固定思路:以鸿蒙版为基底,只挑与骨架无关的小改动套上。lib/utils/android/bindings.g.dart存根本轮又多了一个方法(updateDocProvider),上游每加一个 JNI 绑定就要在存根里补一个空实现,仍固定取--ours后手工补。--unshallow,以后别对upstream-bgg用--depth。