mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-11 06:09:08 -07:00
Desktop: Fix disabling keybinds
Turns out, flipper format does not allow empty value strings
This commit is contained in:
@@ -36,7 +36,9 @@ void desktop_keybinds_migrate(Desktop* desktop) {
|
||||
for(DesktopKeybindType type = 0; type < DesktopKeybindTypeMAX; type++) {
|
||||
for(DesktopKeybindKey key = 0; key < DesktopKeybindKeyMAX; key++) {
|
||||
FuriString* keybind = furi_string_alloc_set(old[type][key].data);
|
||||
if(furi_string_equal(keybind, EXT_PATH("apps/Misc/nightstand.fap"))) {
|
||||
if(furi_string_empty(keybind)) {
|
||||
furi_string_set_str(keybind, "_");
|
||||
} else if(furi_string_equal(keybind, EXT_PATH("apps/Misc/nightstand.fap"))) {
|
||||
furi_string_set(keybind, "Clock");
|
||||
} else if(furi_string_equal(keybind, "RFID")) {
|
||||
furi_string_set(keybind, "125 kHz RFID");
|
||||
@@ -66,8 +68,8 @@ const char* desktop_keybinds_defaults[DesktopKeybindTypeMAX][DesktopKeybindKeyMA
|
||||
},
|
||||
[DesktopKeybindTypeHold] =
|
||||
{
|
||||
[DesktopKeybindKeyUp] = "",
|
||||
[DesktopKeybindKeyDown] = "",
|
||||
[DesktopKeybindKeyUp] = "_",
|
||||
[DesktopKeybindKeyDown] = "_",
|
||||
[DesktopKeybindKeyRight] = "Device Info",
|
||||
[DesktopKeybindKeyLeft] = "Lock with PIN",
|
||||
},
|
||||
@@ -197,7 +199,7 @@ void desktop_run_keybind(Desktop* desktop, InputType _type, InputKey _key) {
|
||||
DesktopKeybindKey key = keybind_keys[_key];
|
||||
FuriString* keybind = desktop_keybinds_load_one(desktop, type, key);
|
||||
|
||||
if(furi_string_empty(keybind)) {
|
||||
if(furi_string_equal(keybind, "_")) {
|
||||
} else if(furi_string_equal(keybind, "Apps Menu")) {
|
||||
loader_start_detached_with_gui_error(desktop->loader, LOADER_APPLICATIONS_NAME, NULL);
|
||||
} else if(furi_string_equal(keybind, "Archive")) {
|
||||
|
||||
Reference in New Issue
Block a user