[FL-1489] IRDA: move to FileWorker (#594)
* [FL-1489] IRDA: move to FileWorker, fixes * Use FileWorker * Use file_select to select remotes * Fix some crashes * Add RAW parsing restrictions * Remove excess scene (LearnDoneAfter) * Move all file system logic to standalone object
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#include "../irda-app.hpp"
|
||||
#include "irda.h"
|
||||
#include "../irda-app-file-parser.hpp"
|
||||
#include <memory>
|
||||
|
||||
static void dialog_result_callback(DialogExResult result, void* context) {
|
||||
auto app = static_cast<IrdaApp*>(context);
|
||||
@@ -61,15 +63,18 @@ bool IrdaAppSceneLearnSuccess::on_event(IrdaApp* app, IrdaAppEvent* event) {
|
||||
signal.transmit();
|
||||
break;
|
||||
}
|
||||
case DialogExResultRight:
|
||||
auto remote_manager = app->get_remote_manager();
|
||||
if(remote_manager->check_fs()) {
|
||||
case DialogExResultRight: {
|
||||
IrdaAppFileParser file_parser;
|
||||
if(file_parser.check_errors()) {
|
||||
app->switch_to_next_scene(IrdaApp::Scene::LearnEnterName);
|
||||
} else {
|
||||
app->switch_to_previous_scene();
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return consumed;
|
||||
|
Reference in New Issue
Block a user