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