mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-26 02:01:02 +00: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
2 changed files with 7 additions and 7 deletions
|
@ -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 a new issue