feat, multi_flutter_ui_sessions

Signed-off-by: dignow <linlong1265@gmail.com>
This commit is contained in:
dignow
2023-10-08 21:44:54 +08:00
parent 5e616dd502
commit 013d307bcd
83 changed files with 2954 additions and 1319 deletions

View File

@@ -1054,7 +1054,7 @@ Widget msgboxIcon(String type) {
if (type == 'on-uac' || type == 'on-foreground-elevated') {
iconData = Icons.admin_panel_settings;
}
if (type == "info") {
if (type.contains('info')) {
iconData = Icons.info;
}
if (iconData != null) {
@@ -2317,7 +2317,7 @@ Widget dialogButton(String text,
}
}
int version_cmp(String v1, String v2) {
int versionCmp(String v1, String v2) {
return bind.versionToNumber(v: v1) - bind.versionToNumber(v: v2);
}
@@ -2589,3 +2589,25 @@ String getDesktopTabLabel(String peerId, String alias) {
}
return label;
}
String getChooseDisplayBehavior() {
var current = bind.mainGetOptionSync(key: kKeyChooseDisplayBehavior);
if (![kChooseDisplayBehaviorSwitch, kChooseDisplayBehaviorOpen]
.contains(current)) {
current = kChooseDisplayBehaviorOpen;
}
return current;
}
sessionRefreshVideo(SessionID sessionId, PeerInfo pi) async {
if (pi.currentDisplay == kAllDisplayValue) {
for (int i = 0; i < pi.displays.length; i++) {
await bind.sessionRefresh(sessionId: sessionId, display: i);
}
} else {
await bind.sessionRefresh(sessionId: sessionId, display: pi.currentDisplay);
}
}
bool get isChooseDisplayToOpen =>
getChooseDisplayBehavior() != kChooseDisplayBehaviorSwitch;