From c14490cdbf340bc8c8ea8fd19719a9c261ac2ca4 Mon Sep 17 00:00:00 2001 From: csf Date: Fri, 23 Sep 2022 17:35:20 +0800 Subject: [PATCH] opt: PeerTile center & keep peer search value --- flutter/lib/common/widgets/peer_card.dart | 4 +--- flutter/lib/common/widgets/peer_tab_page.dart | 3 --- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/flutter/lib/common/widgets/peer_card.dart b/flutter/lib/common/widgets/peer_card.dart index 169e10428..bc4724e41 100644 --- a/flutter/lib/common/widgets/peer_card.dart +++ b/flutter/lib/common/widgets/peer_card.dart @@ -158,6 +158,7 @@ class _PeerCardState extends State<_PeerCard> children: [ Expanded( child: Column( + mainAxisAlignment: MainAxisAlignment.center, children: [ Row(children: [ Padding( @@ -729,9 +730,6 @@ class DiscoveredPeerCard extends BasePeerCard { menuItems.add(_wolAction(peer.id)); menuItems.add(MenuEntryDivider()); menuItems.add(_renameAction(peer.id, false)); - menuItems.add(_removeAction(peer.id, () async { - await bind.mainLoadLanPeers(); - })); menuItems.add(_unrememberPasswordAction(peer.id)); return menuItems; } diff --git a/flutter/lib/common/widgets/peer_tab_page.dart b/flutter/lib/common/widgets/peer_tab_page.dart index 835849ae4..64f353130 100644 --- a/flutter/lib/common/widgets/peer_tab_page.dart +++ b/flutter/lib/common/widgets/peer_tab_page.dart @@ -42,9 +42,6 @@ class _PeerTabPageState extends State // hard code for now Future _handleTabSelection(int index) async { - // reset search text - peerSearchText.value = ""; - peerSearchTextController.clear(); _tabIndex.value = index; await bind.mainSetLocalOption( key: 'peer-tab-index', value: index.toString());