mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-01-18 07:43:01 +08:00
commit
ff491ff06c
@ -982,6 +982,8 @@ class _FileManagerPageState extends State<FileManagerPage>
|
||||
},
|
||||
dismissOnClicked: true));
|
||||
}
|
||||
} catch (e) {
|
||||
debugPrint("buildBread fetchDirectory err=$e");
|
||||
} finally {
|
||||
if (!isLocal) {
|
||||
_ffi.dialogManager.dismissByTag(loadingTag);
|
||||
|
@ -1032,7 +1032,9 @@ class _RemoteMenubarState extends State<RemoteMenubar> {
|
||||
final h265 = codecsJson['h265'] ?? false;
|
||||
codecs.add(h264);
|
||||
codecs.add(h265);
|
||||
} finally {}
|
||||
} catch (e) {
|
||||
debugPrint("Show Codec Preference err=$e");
|
||||
}
|
||||
if (codecs.length == 2 && (codecs[0] || codecs[1])) {
|
||||
displayMenu.add(MenuEntryRadios<String>(
|
||||
text: translate('Codec Preference'),
|
||||
|
@ -696,7 +696,7 @@ class _RemotePageState extends State<RemotePage> {
|
||||
gFFI.dialogManager.show((setState, close) {
|
||||
void setMode(String? v) async {
|
||||
await bind.sessionPeerOption(
|
||||
id: widget.id, name: "keyboard-mode", value: v ?? "");
|
||||
id: widget.id, name: "keyboard-mode", value: v ?? "");
|
||||
setState(() => current = v ?? '');
|
||||
Future.delayed(Duration(milliseconds: 300), close);
|
||||
}
|
||||
@ -978,7 +978,9 @@ void showOptions(
|
||||
final h265 = codecsJson['h265'] ?? false;
|
||||
codecs.add(h264);
|
||||
codecs.add(h265);
|
||||
} finally {}
|
||||
} catch (e) {
|
||||
debugPrint("Show Codec Preference err=$e");
|
||||
}
|
||||
}
|
||||
|
||||
dialogManager.show((setState, close) {
|
||||
|
@ -213,7 +213,6 @@ class FileModel extends ChangeNotifier {
|
||||
}
|
||||
|
||||
receiveFileDir(Map<String, dynamic> evt) {
|
||||
// debugPrint("recv file dir:$evt");
|
||||
if (evt['is_local'] == "false") {
|
||||
// init remote home, the connection will automatic read remote home when established,
|
||||
try {
|
||||
@ -237,7 +236,9 @@ class FileModel extends ChangeNotifier {
|
||||
debugPrint("init remote home:${fd.path}");
|
||||
_currentRemoteDir = fd;
|
||||
}
|
||||
} finally {}
|
||||
} catch (e) {
|
||||
debugPrint("receiveFileDir err=$e");
|
||||
}
|
||||
}
|
||||
_fileFetcher.tryCompleteTask(evt['value'], evt['is_local']);
|
||||
notifyListeners();
|
||||
|
@ -79,12 +79,16 @@ class UserModel {
|
||||
final tag = gFFI.dialogManager.showLoading(translate('Waiting'));
|
||||
try {
|
||||
final url = await bind.mainGetApiServer();
|
||||
final _ = await http.post(Uri.parse('$url/api/logout'),
|
||||
body: {
|
||||
'id': await bind.mainGetMyId(),
|
||||
'uuid': await bind.mainGetUuid(),
|
||||
},
|
||||
headers: await getHttpHeaders());
|
||||
await http
|
||||
.post(Uri.parse('$url/api/logout'),
|
||||
body: {
|
||||
'id': await bind.mainGetMyId(),
|
||||
'uuid': await bind.mainGetUuid(),
|
||||
},
|
||||
headers: await getHttpHeaders())
|
||||
.timeout(Duration(seconds: 2));
|
||||
} catch (e) {
|
||||
print("request /api/logout failed: err=$e");
|
||||
} finally {
|
||||
await reset();
|
||||
gFFI.dialogManager.dismissByTag(tag);
|
||||
|
Loading…
Reference in New Issue
Block a user