From b40a7b24d456360852cbfbc95f1b160325e2df25 Mon Sep 17 00:00:00 2001 From: fufesou Date: Fri, 27 Oct 2023 15:01:20 +0800 Subject: [PATCH] fix, flutter, infinite loop Signed-off-by: fufesou --- flutter/lib/common/widgets/peers_view.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flutter/lib/common/widgets/peers_view.dart b/flutter/lib/common/widgets/peers_view.dart index 24949b94a..ed5f95d41 100644 --- a/flutter/lib/common/widgets/peers_view.dart +++ b/flutter/lib/common/widgets/peers_view.dart @@ -190,14 +190,14 @@ class _PeersViewState extends State<_PeersView> with WindowListener { child: widget.peerCardBuilder(peer), ); final windowWidth = MediaQuery.of(context).size.width; - final model = Provider.of(context); + final currentTab = gFFI.peerTabModel.currentTab; final hideAbTagsPanel = bind.mainGetLocalOption(key: "hideAbTagsPanel").isNotEmpty; return isDesktop ? Obx( () => SizedBox( width: peerCardUiType.value != PeerUiType.list ? 220 - : model.currentTab == PeerTabIndex.group.index || (model.currentTab == PeerTabIndex.ab.index && !hideAbTagsPanel) + : currentTab == PeerTabIndex.group.index || (currentTab == PeerTabIndex.ab.index && !hideAbTagsPanel) ? windowWidth - 390 : windowWidth - 227, height: