fix, change_display_resolution, add comments

Signed-off-by: dignow <linlong1265@gmail.com>
This commit is contained in:
dignow
2023-10-18 09:59:02 +08:00
parent a32e740242
commit c1b865d00e
4 changed files with 38 additions and 24 deletions

View File

@@ -430,14 +430,12 @@ class FfiModel with ChangeNotifier {
Map<String, dynamic> evt, SessionID sessionId, String peerId) {
final curDisplay = int.parse(evt['display']);
// The message should be handled by the another UI session.
if (isChooseDisplayToOpenInNewWindow(_pi, sessionId)) {
if (curDisplay != _pi.currentDisplay) {
return;
}
}
if (_pi.currentDisplay != kAllDisplayValue) {
if (bind.peerGetDefaultSessionsCount(id: peerId) > 1) {
if (curDisplay != _pi.currentDisplay) {
return;
}
}
_pi.currentDisplay = curDisplay;
}
@@ -825,6 +823,7 @@ class FfiModel with ChangeNotifier {
}
_pi.displays = newDisplays;
_pi.displaysCount.value = _pi.displays.length;
if (_pi.currentDisplay == kAllDisplayValue) {
updateCurDisplay(sessionId);
// to-do: What if the displays are changed?