Merge pull request #3759 from NicKoehler/display-state-fix

fix for #3746
This commit is contained in:
RustDesk 2023-03-24 08:37:08 +08:00 committed by GitHub
commit 3b7f264c32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -394,7 +394,7 @@ class _RemoteMenubarState extends State<RemoteMenubar> {
} }
if (PrivacyModeState.find(widget.id).isFalse && if (PrivacyModeState.find(widget.id).isFalse &&
stateGlobal.displaysCount.value > 1) { widget.ffi.ffiModel.pi.displays.length > 1) {
toolbarItems.add( toolbarItems.add(
bind.mainGetUserDefaultOption(key: 'show_monitors_toolbar') == 'Y' bind.mainGetUserDefaultOption(key: 'show_monitors_toolbar') == 'Y'
? _MultiMonitorMenu(id: widget.id, ffi: widget.ffi) ? _MultiMonitorMenu(id: widget.id, ffi: widget.ffi)
@ -2252,10 +2252,10 @@ class _MultiMonitorMenu extends StatelessWidget {
final FFI ffi; final FFI ffi;
const _MultiMonitorMenu({ const _MultiMonitorMenu({
super.key, Key? key,
required this.id, required this.id,
required this.ffi, required this.ffi,
}); }) : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {