mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
Add back favorite timeout to new nfc app
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user