[FL-2456] App notifications update (#1175)

* Notifications update: SubGHz
* Notifications: ibutton, infrared, rfid
This commit is contained in:
Nikolay Minaylov
2022-04-28 20:20:59 +03:00
committed by GitHub
parent af5e03ecb7
commit 4526503d81
29 changed files with 138 additions and 99 deletions

View File

@@ -51,7 +51,7 @@ bool InfraredAppSceneLearn::on_event(InfraredApp* app, InfraredAppEvent* event)
switch(event->type) {
case InfraredAppEvent::Type::Tick:
consumed = true;
app->notify_red_blink();
app->notify_blink_read();
break;
case InfraredAppEvent::Type::InfraredMessageReceived:
app->notify_success();

View File

@@ -95,7 +95,6 @@ bool InfraredAppSceneLearnSuccess::on_event(InfraredApp* app, InfraredAppEvent*
case DialogExPressCenter:
if(!button_pressed) {
button_pressed = true;
app->notify_click_and_green_blink();
auto signal = app->get_received_signal();
if(signal.is_raw()) {

View File

@@ -72,14 +72,12 @@ bool InfraredAppSceneRemote::on_event(InfraredApp* app, InfraredAppEvent* event)
switch(event->payload.menu_index) {
case ButtonIndexPlus:
furi_assert(event->type == InfraredAppEvent::Type::MenuSelected);
app->notify_click();
buttonmenu_item_selected = event->payload.menu_index;
app->set_learn_new_remote(false);
app->switch_to_next_scene(InfraredApp::Scene::Learn);
break;
case ButtonIndexEdit:
furi_assert(event->type == InfraredAppEvent::Type::MenuSelected);
app->notify_click();
buttonmenu_item_selected = event->payload.menu_index;
app->switch_to_next_scene(InfraredApp::Scene::Edit);
break;
@@ -89,7 +87,6 @@ bool InfraredAppSceneRemote::on_event(InfraredApp* app, InfraredAppEvent* event)
if(pressed && !button_pressed) {
button_pressed = true;
app->notify_click_and_green_blink();
auto button_signal =
app->get_remote_manager()->get_button_data(event->payload.menu_index);

View File

@@ -56,6 +56,7 @@ bool InfraredAppSceneUniversalCommon::on_event(InfraredApp* app, InfraredAppEven
if(brute_force_started) {
if(event->type == InfraredAppEvent::Type::Tick) {
auto view_manager = app->get_view_manager();
app->notify_blink_send();
InfraredAppEvent tick_event = {.type = InfraredAppEvent::Type::Tick};
view_manager->send_event(&tick_event);
bool result = brute_force.send_next_bruteforce();
@@ -81,6 +82,7 @@ bool InfraredAppSceneUniversalCommon::on_event(InfraredApp* app, InfraredAppEven
DOLPHIN_DEED(DolphinDeedIrBruteForce);
brute_force_started = true;
show_popup(app, record_amount);
app->notify_blink_send();
} else {
app->switch_to_previous_scene();
}