diff --git a/IceCubesApp/App/SideBarView.swift b/IceCubesApp/App/SideBarView.swift index ba3af48b..55f12089 100644 --- a/IceCubesApp/App/SideBarView.swift +++ b/IceCubesApp/App/SideBarView.swift @@ -31,7 +31,8 @@ struct SideBarView: View { ZStack(alignment: .topTrailing) { SideBarIcon(systemIconName: tab.iconName, isSelected: tab == selectedTab) - if let badge = badgeFor(tab: tab), badge > 0 { + let badge = badgeFor(tab: tab) + if badge > 0 { makeBadgeView(count: badge) } } diff --git a/IceCubesApp/App/Tabs/Settings/SettingsTab.swift b/IceCubesApp/App/Tabs/Settings/SettingsTab.swift index cfa071d6..505cc9a6 100644 --- a/IceCubesApp/App/Tabs/Settings/SettingsTab.swift +++ b/IceCubesApp/App/Tabs/Settings/SettingsTab.swift @@ -188,12 +188,11 @@ struct SettingsTabs: View { Label { Text("settings.app.icon") } icon: { - if let icon = IconSelectorView.Icon(string: UIApplication.shared.alternateIconName ?? "AppIcon") { - Image(uiImage: .init(named: icon.iconName)!) - .resizable() - .frame(width: 25, height: 25) - .cornerRadius(4) - } + let icon = IconSelectorView.Icon(string: UIApplication.shared.alternateIconName ?? "AppIcon") + Image(uiImage: .init(named: icon.iconName)!) + .resizable() + .frame(width: 25, height: 25) + .cornerRadius(4) } } }