mirror of
https://github.com/neon443/ShhShell.git
synced 2026-03-11 13:26:16 +00:00
fix font size being 0 fi not set, fixing another crash
This commit is contained in:
@@ -46,6 +46,9 @@ class HostsManager: ObservableObject, @unchecked Sendable {
|
|||||||
userDefaults.synchronize()
|
userDefaults.synchronize()
|
||||||
self.selectedFont = userDefaults.string(forKey: "selectedFontName") ?? "SF Mono"
|
self.selectedFont = userDefaults.string(forKey: "selectedFontName") ?? "SF Mono"
|
||||||
self.fontSize = CGFloat(userDefaults.double(forKey: "fontSize"))
|
self.fontSize = CGFloat(userDefaults.double(forKey: "fontSize"))
|
||||||
|
if self.fontSize == 0 {
|
||||||
|
self.fontSize = 12
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func selectFont(_ fontName: String) {
|
func selectFont(_ fontName: String) {
|
||||||
|
|||||||
Reference in New Issue
Block a user