fix, android switch display. Remove old display video subscription.

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2023-11-30 16:09:37 +08:00
parent eb0e5c2de3
commit ab28acd709
4 changed files with 32 additions and 17 deletions

View File

@@ -2703,7 +2703,10 @@ openMonitorInTheSameTab(int i, FFI ffi, PeerInfo pi) {
? List.generate(pi.displays.length, (index) => index)
: [i];
bind.sessionSwitchDisplay(
sessionId: ffi.sessionId, value: Int32List.fromList(displays));
isDesktop: isDesktop,
sessionId: ffi.sessionId,
value: Int32List.fromList(displays),
);
ffi.ffiModel.switchToNewDisplay(i, ffi.sessionId, ffi.id);
}

View File

@@ -395,8 +395,10 @@ class FfiModel with ChangeNotifier {
msgBox(sessionId, 'custom-nook-nocancel-hasclose-info', 'Prompt',
'elevated_switch_display_msg', '', parent.target!.dialogManager);
bind.sessionSwitchDisplay(
sessionId: sessionId,
value: Int32List.fromList([pi.primaryDisplay]));
isDesktop: isDesktop,
sessionId: sessionId,
value: Int32List.fromList([pi.primaryDisplay]),
);
}
}
}
@@ -788,7 +790,10 @@ class FfiModel with ChangeNotifier {
// move to the first display and set fullscreen
bind.sessionSwitchDisplay(
sessionId: sessionId, value: Int32List.fromList([0]));
isDesktop: isDesktop,
sessionId: sessionId,
value: Int32List.fromList([0]),
);
_pi.currentDisplay = 0;
try {
CurrentDisplayState.find(peerId).value = _pi.currentDisplay;
@@ -899,7 +904,10 @@ class FfiModel with ChangeNotifier {
: pi.primaryDisplay;
final displays = newDisplay;
bind.sessionSwitchDisplay(
sessionId: sessionId, value: Int32List.fromList([displays]));
isDesktop: isDesktop,
sessionId: sessionId,
value: Int32List.fromList([displays]),
);
if (_pi.isSupportMultiUiSession) {
// If the peer supports multi-ui-session, no switch display message will be send back.