mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-12-13 05:06:30 +04:00
Add ability to disable favourite app in desktop settings
And update changelog
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
### New changes
|
||||
* iButton: Add support for DS1420 (not fully tested)
|
||||
* Desktop: Option to set Tertiary favourite app (Hold right arrow on desktop) - **Desktop settings (pin code, favourite app, autolock time) will be resetted!!! Only one time after installing - due to changes in settings structure, after installing of this release desktop settings will not be reset with next release**
|
||||
* Desktop: Ability to disable favourite app (use last element in a main list `None (disable)`)
|
||||
* Desktop: Fix issue #387 (Ok button was showing invalid file error in dummy mode)
|
||||
* OFW PR: SD Driver: reinit sd card on error (by DrZlo13 | OFW PR 2493)
|
||||
* OFW PR: iButton -> Fix a typo: use right shift instead of greater than (by gsurkov | OFW PR 2506)
|
||||
|
||||
@@ -73,6 +73,12 @@ void desktop_settings_scene_favorite_on_enter(void* context) {
|
||||
}
|
||||
}
|
||||
}
|
||||
submenu_add_item(
|
||||
submenu,
|
||||
"None (disable)",
|
||||
FLIPPER_APPS_COUNT + 1,
|
||||
desktop_settings_scene_favorite_submenu_callback,
|
||||
app);
|
||||
|
||||
if(primary_favorite == 0) {
|
||||
submenu_set_header(submenu, "Primary favorite app:");
|
||||
@@ -95,6 +101,23 @@ bool desktop_settings_scene_favorite_on_event(void* context, SceneManagerEvent e
|
||||
scene_manager_get_scene_state(app->scene_manager, DesktopSettingsAppSceneFavorite);
|
||||
|
||||
if(event.type == SceneManagerEventTypeCustom) {
|
||||
if(event.event >= (FLIPPER_APPS_COUNT + 1)) {
|
||||
if(primary_favorite == 0) {
|
||||
app->settings.favorite_primary.is_external = false;
|
||||
strncpy(app->settings.favorite_primary.name_or_path, "", MAX_APP_LENGTH);
|
||||
} else if(primary_favorite == 1) {
|
||||
app->settings.favorite_secondary.is_external = false;
|
||||
strncpy(app->settings.favorite_secondary.name_or_path, "", MAX_APP_LENGTH);
|
||||
} else if(primary_favorite == 2) {
|
||||
app->settings.favorite_tertiary.is_external = false;
|
||||
strncpy(app->settings.favorite_tertiary.name_or_path, "", MAX_APP_LENGTH);
|
||||
}
|
||||
|
||||
scene_manager_previous_scene(app->scene_manager);
|
||||
consumed = true;
|
||||
furi_string_free(temp_path);
|
||||
return consumed;
|
||||
}
|
||||
if(strcmp(FLIPPER_APPS[event.event].name, FAP_LOADER_APP_NAME) != 0) {
|
||||
if(primary_favorite == 0) {
|
||||
app->settings.favorite_primary.is_external = false;
|
||||
|
||||
Reference in New Issue
Block a user