From e3efd0a69602bf894424729e3c21f2b52720eef7 Mon Sep 17 00:00:00 2001 From: Hengyi Zhang Date: Thu, 19 Sep 2024 16:13:59 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20[JIRA:HCPSDKFIORIUIKIT-2?= =?UTF-8?q?717]=20Feedback=20Patterns?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../_FioriStyles/BannerMultiMessageSheet.fiori.swift | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/Sources/FioriSwiftUICore/_FioriStyles/BannerMultiMessageSheet.fiori.swift b/Sources/FioriSwiftUICore/_FioriStyles/BannerMultiMessageSheet.fiori.swift index bd8503f2e..ca6a2bdd2 100644 --- a/Sources/FioriSwiftUICore/_FioriStyles/BannerMultiMessageSheet.fiori.swift +++ b/Sources/FioriSwiftUICore/_FioriStyles/BannerMultiMessageSheet.fiori.swift @@ -78,7 +78,11 @@ public struct BannerMultiMessageSheet: View { @Binding private var bannerMultiMessages: [BannerMessageListModel] @StateObject private var categorySelect = CategorySelect() - @State private var dimensionSelector: DimensionSelector + @State private var dimensionSelector: DimensionSelector = { + let all = NSLocalizedString("All", tableName: "FioriSwiftUICore", bundle: Bundle.accessor, comment: "") + return DimensionSelector(segmentTitles: [all], selectedIndex: 0) + }() + @State private var timer: Timer? @State private var cancellableSet: Set = [] @@ -95,9 +99,6 @@ public struct BannerMultiMessageSheet: View { turnOnSectionHeader: Bool = true, bannerMultiMessages: Binding<[BannerMessageListModel]>) { - let all = NSLocalizedString("All", tableName: "FioriSwiftUICore", bundle: Bundle.accessor, comment: "") - self.dimensionSelector = DimensionSelector(segmentTitles: [all], selectedIndex: 0) - self.closeAction = closeAction self.removeAction = removeAction self.viewDetailAction = viewDetailAction @@ -123,9 +124,6 @@ public struct BannerMultiMessageSheet: View { bannerMultiMessages: Binding<[BannerMessageListModel]>, @ViewBuilder messageItemView: @escaping ((UUID) -> any View)) { - let all = NSLocalizedString("All", tableName: "FioriSwiftUICore", bundle: Bundle.accessor, comment: "") - self.dimensionSelector = DimensionSelector(segmentTitles: [all], selectedIndex: 0) - self.closeAction = closeAction self.removeAction = removeAction self.turnOnSectionHeader = turnOnSectionHeader