mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-22 11:25:42 +01:00
Fix nvram theme setting
Themes with blank spaces in the middle was not possible. This commit fix it by quoting the string passed to nvrm
This commit is contained in:
parent
c8969630f3
commit
166dcaa7ba
@ -30,6 +30,12 @@ extension String {
|
||||
return data
|
||||
}
|
||||
|
||||
/// - returns: A quoted string for nvram
|
||||
var nvramString: String {
|
||||
return "'\(self)'"
|
||||
}
|
||||
|
||||
|
||||
/// - returns: Bool value indicating that our string start with the same prefix ignoring casing.
|
||||
func hasPrefixIgnoringCase(_ str: String) -> Bool {
|
||||
return self.lowercased().hasPrefix(str.lowercased())
|
||||
|
@ -943,9 +943,9 @@ final class SettingsViewController:
|
||||
|
||||
if nvramValue != theme {
|
||||
if theme.count == 0 {
|
||||
deleteNVRAM(key: key)
|
||||
deleteNVRAM(key: key.nvramString)
|
||||
} else {
|
||||
setNVRAM(key: key, stringValue: theme)
|
||||
setNVRAM(key: key, stringValue: theme.nvramString)
|
||||
}
|
||||
} else {
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user