Merge pull request #886 from DrEverr/fav-app-ok-long

add support for Favorite App - Ok Long
This commit is contained in:
MMX
2025-04-10 03:06:53 +03:00
committed by GitHub
5 changed files with 17 additions and 0 deletions

View File

@@ -14,6 +14,7 @@ typedef enum {
FavoriteAppLeftLong, FavoriteAppLeftLong,
FavoriteAppRightShort, FavoriteAppRightShort,
FavoriteAppRightLong, FavoriteAppRightLong,
FavoriteAppOkLong,
FavoriteAppNumber, FavoriteAppNumber,
} FavoriteAppShortcut; } FavoriteAppShortcut;

View File

@@ -174,6 +174,11 @@ bool desktop_scene_main_on_event(void* context, SceneManagerEvent event) {
desktop, &desktop->settings.favorite_apps[FavoriteAppRightLong]); desktop, &desktop->settings.favorite_apps[FavoriteAppRightLong]);
consumed = true; consumed = true;
break; break;
case DesktopMainEventOpenFavoriteOkLong:
desktop_scene_main_start_favorite(
desktop, &desktop->settings.favorite_apps[FavoriteAppOkLong]);
consumed = true;
break;
case DesktopAnimationEventCheckAnimation: case DesktopAnimationEventCheckAnimation:
animation_manager_check_blocking_process(desktop->animation_manager); animation_manager_check_blocking_process(desktop->animation_manager);

View File

@@ -8,6 +8,7 @@ typedef enum {
DesktopMainEventOpenFavoriteLeftLong, DesktopMainEventOpenFavoriteLeftLong,
DesktopMainEventOpenFavoriteRightShort, DesktopMainEventOpenFavoriteRightShort,
DesktopMainEventOpenFavoriteRightLong, DesktopMainEventOpenFavoriteRightLong,
DesktopMainEventOpenFavoriteOkLong,
DesktopMainEventOpenMenu, DesktopMainEventOpenMenu,
DesktopMainEventOpenDebug, DesktopMainEventOpenDebug,
DesktopMainEventOpenPowerOff, DesktopMainEventOpenPowerOff,

View File

@@ -74,6 +74,7 @@ bool desktop_main_input_callback(InputEvent* event, void* context) {
if(furi_hal_rtc_is_flag_set(FuriHalRtcFlagDebug)) { if(furi_hal_rtc_is_flag_set(FuriHalRtcFlagDebug)) {
main_view->callback(DesktopAnimationEventNewIdleAnimation, main_view->context); main_view->callback(DesktopAnimationEventNewIdleAnimation, main_view->context);
} }
main_view->callback(DesktopMainEventOpenFavoriteOkLong, main_view->context);
} }
} }
} else { } else {

View File

@@ -18,6 +18,7 @@ typedef enum {
DesktopSettingsFavoriteLeftLong, DesktopSettingsFavoriteLeftLong,
DesktopSettingsFavoriteRightShort, DesktopSettingsFavoriteRightShort,
DesktopSettingsFavoriteRightLong, DesktopSettingsFavoriteRightLong,
DesktopSettingsFavoriteOkLong,
DesktopSettingsDummyLeft, DesktopSettingsDummyLeft,
DesktopSettingsDummyLeftLong, DesktopSettingsDummyLeftLong,
DesktopSettingsDummyRight, DesktopSettingsDummyRight,
@@ -182,6 +183,7 @@ void desktop_settings_scene_start_on_enter(void* context) {
variable_item_list_add(variable_item_list, "Favorite App - Left Long", 1, NULL, NULL); variable_item_list_add(variable_item_list, "Favorite App - Left Long", 1, NULL, NULL);
variable_item_list_add(variable_item_list, "Favorite App - Right Short", 1, NULL, NULL); variable_item_list_add(variable_item_list, "Favorite App - Right Short", 1, NULL, NULL);
variable_item_list_add(variable_item_list, "Favorite App - Right Long", 1, NULL, NULL); variable_item_list_add(variable_item_list, "Favorite App - Right Long", 1, NULL, NULL);
variable_item_list_add(variable_item_list, "Favorite App - Ok Long", 1, NULL, NULL);
variable_item_list_add(variable_item_list, "DummyMode - Left", 1, NULL, NULL); variable_item_list_add(variable_item_list, "DummyMode - Left", 1, NULL, NULL);
variable_item_list_add(variable_item_list, "DummyMode - Left Long", 1, NULL, NULL); variable_item_list_add(variable_item_list, "DummyMode - Left Long", 1, NULL, NULL);
@@ -246,6 +248,13 @@ bool desktop_settings_scene_start_on_event(void* context, SceneManagerEvent even
SCENE_STATE_SET_FAVORITE_APP | FavoriteAppRightLong); SCENE_STATE_SET_FAVORITE_APP | FavoriteAppRightLong);
scene_manager_next_scene(app->scene_manager, DesktopSettingsAppSceneFavorite); scene_manager_next_scene(app->scene_manager, DesktopSettingsAppSceneFavorite);
break; break;
case DesktopSettingsFavoriteOkLong:
scene_manager_set_scene_state(
app->scene_manager,
DesktopSettingsAppSceneFavorite,
SCENE_STATE_SET_FAVORITE_APP | FavoriteAppOkLong);
scene_manager_next_scene(app->scene_manager, DesktopSettingsAppSceneFavorite);
break;
case DesktopSettingsDummyLeft: case DesktopSettingsDummyLeft:
scene_manager_set_scene_state( scene_manager_set_scene_state(