File tree Expand file tree Collapse file tree
lib/common/global/platform Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55 "name" : " Flutter with Proxy" ,
66 "request" : " launch" ,
77 "type" : " dart" ,
8- "env" : {
9- "http_proxy" : " http://127.0.0.1:7890" ,
10- "https_proxy" : " http://127.0.0.1:7890" ,
11- "HTTP_PROXY" : " http://127.0.0.1:7890" ,
12- "HTTPS_PROXY" : " http://127.0.0.1:7890"
13- }
8+ // "env": {
9+ // "http_proxy": "http://127.0.0.1:7890",
10+ // "https_proxy": "http://127.0.0.1:7890",
11+ // "HTTP_PROXY": "http://127.0.0.1:7890",
12+ // "HTTPS_PROXY": "http://127.0.0.1:7890"
13+ // }
1414 }
1515 ]
1616}
Original file line number Diff line number Diff line change @@ -127,6 +127,8 @@ class DesktopManager {
127127
128128 static Future <void > updateTray () async {
129129 if (! PlatformUtils .isDesktop) return ;
130+
131+ await trayManager.setToolTip ('纯粹直播' );
130132 try {
131133 bool isWindowVisible = await windowManager.isVisible ();
132134 Menu menu = Menu (
@@ -173,8 +175,12 @@ class DesktopManager {
173175 if (! PlatformUtils .isDesktop) return ;
174176
175177 try {
176- if (! await windowManager.isVisible ()) {
178+ bool isVisible = await windowManager.isVisible ();
179+ if (isVisible) {
180+ await windowManager.focus ();
181+ } else {
177182 await windowManager.show ();
183+ await windowManager.setSkipTaskbar (false );
178184 }
179185 } catch (e) {
180186 debugPrint ('托盘图标点击处理失败: $e ' );
@@ -285,7 +291,9 @@ mixin DesktopWindowMixin<T extends StatefulWidget> on State<T> implements Window
285291
286292 @override
287293 void onTrayIconRightMouseUp () {
288- trayManager.popUpContextMenu ();
294+ windowManager.focus ().then ((_) {
295+ trayManager.popUpContextMenu ();
296+ });
289297 }
290298
291299 @override
You can’t perform that action at this time.
0 commit comments