fix syninfo, add ab two menutiems: sync ab with recent sessions and sort tags

This commit is contained in:
rustdesk
2023-07-26 19:53:57 +08:00
parent c711084807
commit 8b8f50ed0f
5 changed files with 99 additions and 37 deletions

View File

@ -10,11 +10,22 @@ import 'package:http/http.dart' as http;
import '../common.dart';
final syncAbOption = 'sync-ab-with-recent-sessions';
bool shouldSyncAb() {
return bind.mainGetLocalOption(key: syncAbOption).isNotEmpty;
}
final sortAbTagsOption = 'sync-ab-tags';
bool shouldSortTags() {
return bind.mainGetLocalOption(key: sortAbTagsOption).isNotEmpty;
}
class AbModel {
final abLoading = false.obs;
final abError = "".obs;
final tags = [].obs;
final peers = List<Peer>.empty(growable: true).obs;
final sortTags = shouldSortTags().obs;
final selectedTags = List<String>.empty(growable: true).obs;
var initialized = false;