Merge pull request #4587 from rustdesk/revert-4586-msgbox
Revert "not accept dialog show when desktop page dispose"
This commit is contained in:
		
						commit
						4e00945a5d
					
				| @ -600,16 +600,12 @@ class OverlayDialogManager { | |||||||
|   int _tagCount = 0; |   int _tagCount = 0; | ||||||
| 
 | 
 | ||||||
|   OverlayEntry? _mobileActionsOverlayEntry; |   OverlayEntry? _mobileActionsOverlayEntry; | ||||||
|   bool _stop = false; |  | ||||||
| 
 | 
 | ||||||
|   void setOverlayState(OverlayKeyState overlayKeyState) { |   void setOverlayState(OverlayKeyState overlayKeyState) { | ||||||
|     _overlayKeyState = overlayKeyState; |     _overlayKeyState = overlayKeyState; | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   void dismissAll({bool? stop}) { |   void dismissAll() { | ||||||
|     if (stop != null) { |  | ||||||
|       _stop = stop; |  | ||||||
|     } |  | ||||||
|     _dialogs.forEach((key, value) { |     _dialogs.forEach((key, value) { | ||||||
|       value.complete(null); |       value.complete(null); | ||||||
|       BackButtonInterceptor.removeByName(key); |       BackButtonInterceptor.removeByName(key); | ||||||
| @ -629,7 +625,6 @@ class OverlayDialogManager { | |||||||
|       String? tag, |       String? tag, | ||||||
|       bool useAnimation = true, |       bool useAnimation = true, | ||||||
|       bool forceGlobal = false}) { |       bool forceGlobal = false}) { | ||||||
|     if (_stop) return Future(() => null); |  | ||||||
|     final overlayState = |     final overlayState = | ||||||
|         forceGlobal ? globalKey.currentState?.overlay : _overlayKeyState.state; |         forceGlobal ? globalKey.currentState?.overlay : _overlayKeyState.state; | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -97,7 +97,7 @@ class _FileManagerPageState extends State<FileManagerPage> | |||||||
|   void dispose() { |   void dispose() { | ||||||
|     model.close().whenComplete(() { |     model.close().whenComplete(() { | ||||||
|       _ffi.close(); |       _ffi.close(); | ||||||
|       _ffi.dialogManager.dismissAll(stop: true); |       _ffi.dialogManager.dismissAll(); | ||||||
|       if (!Platform.isLinux) { |       if (!Platform.isLinux) { | ||||||
|         Wakelock.disable(); |         Wakelock.disable(); | ||||||
|       } |       } | ||||||
|  | |||||||
| @ -70,7 +70,7 @@ class _PortForwardPageState extends State<PortForwardPage> | |||||||
|   @override |   @override | ||||||
|   void dispose() { |   void dispose() { | ||||||
|     _ffi.close(); |     _ffi.close(); | ||||||
|     _ffi.dialogManager.dismissAll(stop: true); |     _ffi.dialogManager.dismissAll(); | ||||||
|     if (!Platform.isLinux) { |     if (!Platform.isLinux) { | ||||||
|       Wakelock.disable(); |       Wakelock.disable(); | ||||||
|     } |     } | ||||||
|  | |||||||
| @ -220,7 +220,7 @@ class _RemotePageState extends State<RemotePage> | |||||||
|     _rawKeyFocusNode.dispose(); |     _rawKeyFocusNode.dispose(); | ||||||
|     _ffi.close(); |     _ffi.close(); | ||||||
|     _timer?.cancel(); |     _timer?.cancel(); | ||||||
|     _ffi.dialogManager.dismissAll(stop: true); |     _ffi.dialogManager.dismissAll(); | ||||||
|     SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, |     SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, | ||||||
|         overlays: SystemUiOverlay.values); |         overlays: SystemUiOverlay.values); | ||||||
|     if (!Platform.isLinux) { |     if (!Platform.isLinux) { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user