remove _hideSort which cause wrong state, let check directly
This commit is contained in:
parent
0fc98a9a76
commit
df707e224e
@ -41,8 +41,6 @@ EdgeInsets? _menuPadding() {
|
|||||||
|
|
||||||
class _PeerTabPageState extends State<PeerTabPage>
|
class _PeerTabPageState extends State<PeerTabPage>
|
||||||
with SingleTickerProviderStateMixin {
|
with SingleTickerProviderStateMixin {
|
||||||
bool _hideSort = gFFI.peerTabModel.currentTab == 0;
|
|
||||||
|
|
||||||
final List<_TabEntry> entries = [
|
final List<_TabEntry> entries = [
|
||||||
_TabEntry(
|
_TabEntry(
|
||||||
RecentPeersView(
|
RecentPeersView(
|
||||||
@ -87,7 +85,6 @@ class _PeerTabPageState extends State<PeerTabPage>
|
|||||||
if (tabIndex < entries.length) {
|
if (tabIndex < entries.length) {
|
||||||
gFFI.peerTabModel.setCurrentTab(tabIndex);
|
gFFI.peerTabModel.setCurrentTab(tabIndex);
|
||||||
entries[tabIndex].load();
|
entries[tabIndex].load();
|
||||||
_hideSort = tabIndex == 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -115,7 +112,7 @@ class _PeerTabPageState extends State<PeerTabPage>
|
|||||||
child: _createPeerViewTypeSwitch(context)
|
child: _createPeerViewTypeSwitch(context)
|
||||||
.marginOnly(left: 13)),
|
.marginOnly(left: 13)),
|
||||||
Offstage(
|
Offstage(
|
||||||
offstage: _hideSort,
|
offstage: gFFI.peerTabModel.currentTab == 0,
|
||||||
child: PeerSortDropdown().marginOnly(left: 8),
|
child: PeerSortDropdown().marginOnly(left: 8),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user