release: bump version to 6.6.25+2606241
主要变更: 1. 新增桌面端托盘图标支持深色/浅色主题切换 2. 重构应用锁、动画配置、小组件导航服务职责 3. 修复Riverpod初始化断言、防重复点击、工作台模式残留选中态问题 4. 优化诗词服务、阅读进度、搜索结果空状态体验 5. 完善macOS打包配置与错误静默处理逻辑 6. 新增快速卡片多语言适配与动画退出队列管理
This commit is contained in:
@@ -17,7 +17,7 @@ import flutter_app_group_directory
|
||||
import flutter_image_compress_macos
|
||||
import flutter_inappwebview_macos
|
||||
import flutter_local_notifications
|
||||
import flutter_secure_storage_macos
|
||||
import flutter_secure_storage_darwin
|
||||
import flutter_tts
|
||||
import flutter_webrtc
|
||||
import gal
|
||||
@@ -56,7 +56,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||
FlutterImageCompressMacosPlugin.register(with: registry.registrar(forPlugin: "FlutterImageCompressMacosPlugin"))
|
||||
InAppWebViewFlutterPlugin.register(with: registry.registrar(forPlugin: "InAppWebViewFlutterPlugin"))
|
||||
FlutterLocalNotificationsPlugin.register(with: registry.registrar(forPlugin: "FlutterLocalNotificationsPlugin"))
|
||||
FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin"))
|
||||
FlutterSecureStorageDarwinPlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStorageDarwinPlugin"))
|
||||
FlutterTtsPlugin.register(with: registry.registrar(forPlugin: "FlutterTtsPlugin"))
|
||||
FlutterWebRTCPlugin.register(with: registry.registrar(forPlugin: "FlutterWebRTCPlugin"))
|
||||
GalPlugin.register(with: registry.registrar(forPlugin: "GalPlugin"))
|
||||
|
||||
@@ -549,7 +549,7 @@
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
@@ -682,7 +682,7 @@
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
@@ -732,8 +732,9 @@
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements;
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
ARCHS = arm64;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEVELOPMENT_TEAM = 5V9NVUU6K5;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
<string>$(FLUTTER_BUILD_NAME)</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(FLUTTER_BUILD_NUMBER)</string>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.lifestyle</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
@@ -30,6 +32,8 @@
|
||||
<string>MainMenu</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
<key>NSPhotoLibraryUsageDescription</key>
|
||||
<string>闲言需要访问您的相册以选择和保存壁纸图片。</string>
|
||||
<key>FLTEnableImpeller</key>
|
||||
<true/>
|
||||
<!-- URL Scheme — 供 xianyan:// 深度链接跳转 -->
|
||||
@@ -56,6 +60,8 @@
|
||||
<string>Font File</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Alternate</string>
|
||||
<key>LSItemContentTypes</key>
|
||||
<array>
|
||||
<string>public.truetype-ttf-font</string>
|
||||
@@ -64,5 +70,8 @@
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<!-- 加密出口合规 — 声明不使用非豁免加密,跳过App Store Connect合规问卷 -->
|
||||
<key>ITSAppUsesNonExemptEncryption</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/// ============================================================
|
||||
/// 闲言APP — macOS 主窗口
|
||||
/// 创建时间: 2026-06-02
|
||||
/// 更新时间: 2026-06-19
|
||||
/// 更新时间: 2026-06-24
|
||||
/// 作用: 主窗口初始化,注册 apps.xy.xianyan/macos MethodChannel
|
||||
/// 上次更新: 新增 Touch Bar 支持、NSSharingService 共享面板
|
||||
/// 上次更新: 监听全屏退出事件,修复退出全屏后窗口背景变黑的问题
|
||||
/// ============================================================
|
||||
|
||||
import Cocoa
|
||||
@@ -14,7 +14,7 @@ class MainFlutterWindow: NSWindow, NSTouchBarDelegate {
|
||||
// MARK: - 属性
|
||||
// ============================================================
|
||||
|
||||
/// 平台通道引用,用于 Touch Bar 按钮回调
|
||||
/// 平台通道引用,用于 Touch Bar 按钮回调 + 全屏退出事件通知
|
||||
private var platformChannel: FlutterMethodChannel?
|
||||
|
||||
/// Touch Bar 按钮配置 [{label: "加粗", action: "bold"}, ...]
|
||||
@@ -31,9 +31,56 @@ class MainFlutterWindow: NSWindow, NSTouchBarDelegate {
|
||||
// 在 Flutter 引擎启动前注册自定义 MethodChannel,避免 MissingPluginException
|
||||
registerPlatformChannel(controller: flutterViewController)
|
||||
|
||||
// 监听全屏退出:修复全屏退出后窗口背景变黑的问题
|
||||
// 全屏模式下 macOS 强制窗口不透明,退出后需重新设置背景透明
|
||||
NotificationCenter.default.addObserver(
|
||||
self,
|
||||
selector: #selector(handleFullScreenExit(_:)),
|
||||
name: NSWindow.didExitFullScreenNotification,
|
||||
object: self
|
||||
)
|
||||
|
||||
super.awakeFromNib()
|
||||
}
|
||||
|
||||
deinit {
|
||||
NotificationCenter.default.removeObserver(self)
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
// MARK: - 全屏退出处理
|
||||
// ============================================================
|
||||
|
||||
/// 全屏退出后重新应用窗口透明背景
|
||||
///
|
||||
/// 修复问题:通过「视图 → Enter Full Screen」进入原生全屏后,
|
||||
/// 点击绿灯退出全屏(选择小窗),窗口背景变为黑色而非透明。
|
||||
///
|
||||
/// 根因:macos_window_utils 的 `setWindowBackgroundColorToClear()` 设置了
|
||||
/// `isOpaque=false` + `backgroundColor=NSColor.clear`。但全屏模式下 macOS
|
||||
/// 强制窗口不透明(`isOpaque=true`, `backgroundColor=黑色`),
|
||||
/// 退出全屏后这些属性未自动恢复,导致窗口外侧显示黑色而非桌面。
|
||||
/// 同时 `titlebarAppearsTransparent` 也可能被系统重置。
|
||||
///
|
||||
/// 修复:监听 `NSWindow.didExitFullScreenNotification`,
|
||||
/// 退出全屏后立即重新设置 `isOpaque=false` + `backgroundColor=clear` +
|
||||
/// `titlebarAppearsTransparent=true`,并通过 MethodChannel 通知 Dart 侧
|
||||
/// 重新应用完整窗口特效(NSVisualEffectView 毛玻璃等)。
|
||||
@objc private func handleFullScreenExit(_ notification: Notification) {
|
||||
DispatchQueue.main.async { [weak self] in
|
||||
guard let self = self else { return }
|
||||
// 重新设置窗口背景透明(让 NSVisualEffectView 透出)
|
||||
self.isOpaque = false
|
||||
self.backgroundColor = NSColor.clear
|
||||
// 重新设置标题栏透明(由 Flutter 侧自绘标题栏)
|
||||
self.titlebarAppearsTransparent = true
|
||||
// 触发窗口重绘
|
||||
self.contentView?.needsDisplay = true
|
||||
// 通知 Dart 侧重新应用完整窗口特效(NSVisualEffectView 等)
|
||||
self.platformChannel?.invokeMethod("onFullScreenExited", arguments: nil)
|
||||
}
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
// MARK: - MethodChannel 注册
|
||||
// ============================================================
|
||||
|
||||
Reference in New Issue
Block a user