diff --git a/flutter/lib/common/widgets/peer_card.dart b/flutter/lib/common/widgets/peer_card.dart index def9cbc6f..ab2c8309a 100644 --- a/flutter/lib/common/widgets/peer_card.dart +++ b/flutter/lib/common/widgets/peer_card.dart @@ -1100,7 +1100,7 @@ class MyGroupPeerCard extends BasePeerCard { if (Platform.isWindows) { menuItems.add(_createShortCutAction(peer.id)); } - menuItems.add(MenuEntryDivider()); + // menuItems.add(MenuEntryDivider()); // menuItems.add(_renameAction(peer.id)); // if (await bind.mainPeerHasPassword(id: peer.id)) { // menuItems.add(_unrememberPasswordAction(peer.id)); diff --git a/flutter/lib/desktop/widgets/tabbar_widget.dart b/flutter/lib/desktop/widgets/tabbar_widget.dart index ce0dbe027..f95ee8923 100644 --- a/flutter/lib/desktop/widgets/tabbar_widget.dart +++ b/flutter/lib/desktop/widgets/tabbar_widget.dart @@ -269,11 +269,8 @@ class DesktopTab extends StatelessWidget { } static RxString tablabelGetter(String peerId) { - PeerStringOption.init(peerId, 'tabLabel', () { - final alias = bind.mainGetPeerOptionSync(id: peerId, key: 'alias'); - return getDesktopTabLabel(peerId, alias); - }); - return PeerStringOption.find(peerId, 'tabLabel'); + final alias = bind.mainGetPeerOptionSync(id: peerId, key: 'alias'); + return RxString(getDesktopTabLabel(peerId, alias)); } @override diff --git a/flutter/lib/models/model.dart b/flutter/lib/models/model.dart index 0f6cc5b9c..02e02a8ba 100644 --- a/flutter/lib/models/model.dart +++ b/flutter/lib/models/model.dart @@ -266,8 +266,6 @@ class FfiModel with ChangeNotifier { updateBlockInputState(evt, peerId); } else if (name == 'update_privacy_mode') { updatePrivacyMode(evt, sessionId, peerId); - } else if (name == 'alias') { - handleAliasChanged(evt); } else if (name == 'show_elevation') { final show = evt['show'].toString() == 'true'; parent.target?.serverModel.setShowElevation(show); @@ -353,17 +351,6 @@ class FfiModel with ChangeNotifier { platformFFI.setEventCallback(startEventListener(sessionId, peerId)); } - handleAliasChanged(Map evt) { - if (!isDesktop) return; - final String peerId = evt['id']; - final String alias = evt['alias']; - String label = getDesktopTabLabel(peerId, alias); - final rxTabLabel = PeerStringOption.find(evt['id'], 'tabLabel'); - if (rxTabLabel.value != label) { - rxTabLabel.value = label; - } - } - _updateCurDisplay(SessionID sessionId, Display newDisplay) { if (newDisplay != _display) { if (newDisplay.x != _display.x || newDisplay.y != _display.y) { diff --git a/flutter/test/cm_test.dart b/flutter/test/cm_test.dart index fca9d8cee..21b87b848 100644 --- a/flutter/test/cm_test.dart +++ b/flutter/test/cm_test.dart @@ -16,7 +16,7 @@ final testClients = [ Client(3, false, false, "UserDDDDDDDDDDDd", "441123123", true, false, false) ]; -/// flutter run -d {platform} -t lib/cm_test.dart to test cm +/// flutter run -d {platform} -t test/cm_test.dart to test cm void main(List args) async { isTest = true; WidgetsFlutterBinding.ensureInitialized(); diff --git a/src/flutter_ffi.rs b/src/flutter_ffi.rs index 9ebbc4b8a..63ced340d 100644 --- a/src/flutter_ffi.rs +++ b/src/flutter_ffi.rs @@ -823,11 +823,6 @@ pub fn main_set_peer_option_sync(id: String, key: String, value: String) -> Sync } pub fn main_set_peer_alias(id: String, alias: String) { - main_broadcast_message(&HashMap::from([ - ("name", "alias"), - ("id", &id), - ("alias", &alias), - ])); set_peer_option(id, "alias".to_owned(), alias) }