Fix. Peer tab, match name and icon (#7489)

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou 2024-03-23 22:23:30 +08:00 committed by GitHub
parent 05969c2f99
commit dd90e84f6a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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<IconData> 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<bool> _isVisible = List.filled(5, true, growable: false);
List<bool> 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');