fix, flutter, infinite loop
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
parent
42eb49b84c
commit
b40a7b24d4
@ -190,14 +190,14 @@ class _PeersViewState extends State<_PeersView> with WindowListener {
|
|||||||
child: widget.peerCardBuilder(peer),
|
child: widget.peerCardBuilder(peer),
|
||||||
);
|
);
|
||||||
final windowWidth = MediaQuery.of(context).size.width;
|
final windowWidth = MediaQuery.of(context).size.width;
|
||||||
final model = Provider.of<PeerTabModel>(context);
|
final currentTab = gFFI.peerTabModel.currentTab;
|
||||||
final hideAbTagsPanel = bind.mainGetLocalOption(key: "hideAbTagsPanel").isNotEmpty;
|
final hideAbTagsPanel = bind.mainGetLocalOption(key: "hideAbTagsPanel").isNotEmpty;
|
||||||
return isDesktop
|
return isDesktop
|
||||||
? Obx(
|
? Obx(
|
||||||
() => SizedBox(
|
() => SizedBox(
|
||||||
width: peerCardUiType.value != PeerUiType.list
|
width: peerCardUiType.value != PeerUiType.list
|
||||||
? 220
|
? 220
|
||||||
: model.currentTab == PeerTabIndex.group.index || (model.currentTab == PeerTabIndex.ab.index && !hideAbTagsPanel)
|
: currentTab == PeerTabIndex.group.index || (currentTab == PeerTabIndex.ab.index && !hideAbTagsPanel)
|
||||||
? windowWidth - 390 :
|
? windowWidth - 390 :
|
||||||
windowWidth - 227,
|
windowWidth - 227,
|
||||||
height:
|
height:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user