[FL-2463, FL-2471, FL-2472, FL-2473] Notifications, GUI elements, archive fixes #1137

This commit is contained in:
Nikolay Minaylov
2022-04-21 15:33:03 +03:00
committed by GitHub
parent cea118cf2d
commit ad1ee8a5c6
9 changed files with 55 additions and 17 deletions

View File

@@ -82,12 +82,22 @@ static void screen_changed(VariableItem* item) {
notification_message(app->notification, &sequence_display_on);
}
const NotificationMessage apply_message = {
.type = NotificationMessageTypeLedBrightnessSettingApply,
};
const NotificationSequence apply_sequence = {
&apply_message,
NULL,
};
static void led_changed(VariableItem* item) {
NotificationAppSettings* app = variable_item_get_context(item);
uint8_t index = variable_item_get_current_value_index(item);
variable_item_set_current_value_text(item, backlight_text[index]);
app->notification->settings.led_brightness = backlight_value[index];
notification_message(app->notification, &apply_sequence);
notification_internal_message(app->notification, &apply_sequence);
notification_message(app->notification, &sequence_blink_white_100);
}