mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-01-24 19:51:29 +01:00
Fix build with Swift 5.8 (#986)
Non optionals in if let don't work on the latest Xcode Beta
This commit is contained in:
parent
0011b25a1c
commit
ded5bea4ce
@ -31,7 +31,8 @@ struct SideBarView<Content: View>: 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)
|
||||
}
|
||||
}
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user