From dd90e84f6a690dd5d7212c6e1d2a7d3c2f4114c9 Mon Sep 17 00:00:00 2001 From: fufesou Date: Sat, 23 Mar 2024 22:23:30 +0800 Subject: [PATCH] Fix. Peer tab, match name and icon (#7489) Signed-off-by: fufesou --- flutter/lib/models/peer_tab_model.dart | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/flutter/lib/models/peer_tab_model.dart b/flutter/lib/models/peer_tab_model.dart index 006da8560..43bbfda72 100644 --- a/flutter/lib/models/peer_tab_model.dart +++ b/flutter/lib/models/peer_tab_model.dart @@ -25,13 +25,15 @@ class PeerTabModel with ChangeNotifier { 'Recent sessions', 'Favorites', if (!isWeb) 'Discovered', + if (!(bind.isDisableAb() || bind.isDisableAccount())) 'Address book', + if (!bind.isDisableAccount()) 'Group', ]; final List icons = [ Icons.access_time_filled, Icons.star, - Icons.explore, - IconFont.addressBook, - Icons.group, + if (!isWeb) Icons.explore, + if (!(bind.isDisableAb() || bind.isDisableAccount())) IconFont.addressBook, + if (!bind.isDisableAccount()) Icons.group, ]; final List _isVisible = List.filled(5, true, growable: false); List get isVisible => _isVisible; @@ -49,13 +51,6 @@ class PeerTabModel with ChangeNotifier { String get lastId => _lastId; PeerTabModel(this.parent) { - if (!(bind.isDisableAb() || bind.isDisableAccount())) { - tabNames.add('Address book'); - } - if (!bind.isDisableAccount()) { - tabNames.add('Group'); - } - // visible try { final option = bind.getLocalFlutterOption(k: 'peer-tab-visible');