mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
Show alias if set, on remote tab
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
@@ -201,3 +201,25 @@ class RemoteCountState {
|
||||
|
||||
static RxInt find() => Get.find<RxInt>(tag: tag());
|
||||
}
|
||||
|
||||
class PeerStringOption {
|
||||
static String tag(String id, String opt) => 'peer_{$opt}_$id';
|
||||
|
||||
static void init(String id, String opt, String Function() init_getter) {
|
||||
final key = tag(id, opt);
|
||||
if (!Get.isRegistered(tag: key)) {
|
||||
final RxString value = RxString(init_getter());
|
||||
Get.put(value, tag: key);
|
||||
}
|
||||
}
|
||||
|
||||
static void delete(String id, String opt) {
|
||||
final key = tag(id, opt);
|
||||
if (Get.isRegistered(tag: key)) {
|
||||
Get.delete(tag: key);
|
||||
}
|
||||
}
|
||||
|
||||
static RxString find(String id, String opt) =>
|
||||
Get.find<RxString>(tag: tag(id, opt));
|
||||
}
|
||||
|
||||
@@ -584,7 +584,7 @@ abstract class BasePeerCard extends StatelessWidget {
|
||||
submit() async {
|
||||
isInProgress.value = true;
|
||||
name = controller.text;
|
||||
await bind.mainSetPeerOption(id: id, key: 'alias', value: name);
|
||||
await bind.mainSetPeerAlias(id: id, alias: name);
|
||||
if (isAddressBook) {
|
||||
gFFI.abModel.setPeerAlias(id, name);
|
||||
await gFFI.abModel.pushAb();
|
||||
|
||||
Reference in New Issue
Block a user