From 3d7c6c14b3269fc32c31c895242c4eab29393352 Mon Sep 17 00:00:00 2001 From: Sahil Yeole Date: Wed, 1 Nov 2023 00:59:28 +0530 Subject: [PATCH] fix remember list view Signed-off-by: Sahil Yeole --- flutter/lib/common/widgets/peer_tab_page.dart | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/flutter/lib/common/widgets/peer_tab_page.dart b/flutter/lib/common/widgets/peer_tab_page.dart index d472d086f..4913e5212 100644 --- a/flutter/lib/common/widgets/peer_tab_page.dart +++ b/flutter/lib/common/widgets/peer_tab_page.dart @@ -75,9 +75,11 @@ class _PeerTabPageState extends State void initState() { final uiType = bind.getLocalFlutterOption(k: 'peer-card-ui-type'); if (uiType != '') { - peerCardUiType.value = int.parse(uiType) == PeerUiType.list.index - ? PeerUiType.list - : PeerUiType.grid; + peerCardUiType.value = int.parse(uiType) == 0 + ? PeerUiType.grid + : int.parse(uiType) == 1 + ? PeerUiType.tile + : PeerUiType.list; } hideAbTagsPanel.value = bind.mainGetLocalOption(key: "hideAbTagsPanel").isNotEmpty;