Skip to content

Commit 04c143d

Browse files
committed
修复 Linux通知 缺少notify-send崩溃
1 parent 1fc05c2 commit 04c143d

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

CHANGELOG/v2.3.0-beta.1/CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ v2.3 - Shirako (砂狼白子) beta 1
99
- 新增 **UIAccess置顶**,支持在Windows 10/11下开启UIAccess置顶(主窗口/通知浮窗/浮窗)
1010
- 新增 **主窗口置顶**,基础设置支持主窗口置顶配置
1111
- 新增 **计时器窗口**,支持倒计时秒表时钟
12-
- 新增 **浮窗计时器**,一键打开计时器
13-
- 新增 **计时器窗口**,5秒无操作收起
1412

1513
## 💡 功能优化
1614

@@ -22,6 +20,8 @@ v2.3 - Shirako (砂狼白子) beta 1
2220
## 🐛 修复问题
2321

2422
- 修复 **通知浮窗** 开启卡片显示后背景异常
23+
- 修复 **简化模式** 设置项缺失崩溃
24+
- 修复 **Linux通知** 缺少notify-send崩溃
2525

2626
## 🔧 其它变更
2727

app/tools/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ def _send_linux_notification(
420420
)
421421
logger.debug(f"已发送Linux通知(不包含URL): {title}")
422422
return True
423-
except subprocess.CalledProcessError:
423+
except (subprocess.CalledProcessError, FileNotFoundError):
424424
try:
425425
from plyer import notification
426426

app/tools/settings_visibility_config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"background_resident": False,
77
"auto_save_window_size": False,
88
"url_protocol": False,
9+
"main_window_topmost_mode": False,
910
},
1011
"roll_call_settings": {
1112
"use_global_font": False,

app/tools/settings_visibility_manager.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,5 @@ def is_setting_visible(category: str, setting_name: str) -> bool:
1616
"""
1717
simplified_mode = readme_settings_async("basic_settings", "simplified_mode")
1818
if simplified_mode:
19-
return SETTINGS_VISIBILITY_CONFIG[category][setting_name]
20-
else:
21-
return True
19+
return SETTINGS_VISIBILITY_CONFIG.get(category, {}).get(setting_name, True)
20+
return True

0 commit comments

Comments
 (0)