Add back favorite timeout to new nfc app

This commit is contained in:
Willy-JL
2023-11-12 12:38:48 +00:00
parent 2effc5fde8
commit 692d1a7363

View File

@@ -1,6 +1,7 @@
#include "nfc_app_i.h"
#include <dolphin/dolphin.h>
#include <applications/main/archive/helpers/archive_helpers_ext.h>
bool nfc_custom_event_callback(void* context, uint32_t event) {
furi_assert(context);
@@ -468,6 +469,7 @@ int32_t nfc_app(void* p) {
NfcApp* nfc = nfc_app_alloc();
const char* args = p;
bool is_favorite = process_favorite_launch((char**)&args);
if(args && strlen(args)) {
if(sscanf(args, "RPC %p", &nfc->rpc_ctx) == 1) {
rpc_system_app_set_callback(nfc->rpc_ctx, nfc_app_rpc_command_callback, nfc);
@@ -492,7 +494,11 @@ int32_t nfc_app(void* p) {
scene_manager_next_scene(nfc->scene_manager, NfcSceneStart);
}
view_dispatcher_run(nfc->view_dispatcher);
if(is_favorite) {
favorite_timeout_run(nfc->view_dispatcher, nfc->scene_manager);
} else {
view_dispatcher_run(nfc->view_dispatcher);
}
nfc_app_free(nfc);