Merge pull request #2450 from 21pages/tab

fix menu padding mistake
This commit is contained in:
RustDesk 2022-12-05 09:49:33 +08:00 committed by GitHub
commit a472439db7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,6 +29,10 @@ class _TabEntry {
_TabEntry(this.name, this.widget, this.load);
}
EdgeInsets? _menuPadding() {
return isDesktop ? kDesktopMenuPadding : null;
}
class _PeerTabPageState extends State<PeerTabPage>
with SingleTickerProviderStateMixin {
late final RxInt tabHiddenFlag;
@ -38,25 +42,25 @@ class _PeerTabPageState extends State<PeerTabPage>
_TabEntry(
'Recent Sessions',
RecentPeersView(
menuPadding: kDesktopMenuPadding,
menuPadding: _menuPadding(),
),
bind.mainLoadRecentPeers),
_TabEntry(
'Favorites',
FavoritePeersView(
menuPadding: kDesktopMenuPadding,
menuPadding: _menuPadding(),
),
bind.mainLoadFavPeers),
_TabEntry(
'Discovered',
DiscoveredPeersView(
menuPadding: kDesktopMenuPadding,
menuPadding: _menuPadding(),
),
bind.mainDiscover),
_TabEntry(
'Address Book',
const AddressBook(
menuPadding: kDesktopMenuPadding,
AddressBook(
menuPadding: _menuPadding(),
),
() => {}),
];