Only use favorite timeout where supported

This commit is contained in:
Willy-JL
2023-07-02 23:08:58 +02:00
parent 4e30ce2c25
commit a05bdfe788
4 changed files with 4 additions and 7 deletions

View File

@@ -62,7 +62,10 @@ static void
loader_start_with_gui_error(loader, app_name, param);
} else {
const char* str = furi_string_get_cstr(selected->path);
if(favorites) {
if(favorites &&
(selected->type == ArchiveFileTypeIButton ||
selected->type == ArchiveFileTypeLFRFID || selected->type == ArchiveFileTypeNFC ||
selected->type == ArchiveFileTypeSubGhz)) {
char arg[strlen(str) + 4];
snprintf(arg, sizeof(arg), "fav%s", str);
loader_start_with_gui_error(loader, app_name, arg);

View File

@@ -5,7 +5,6 @@
#include <lib/toolbox/path.h>
#include <xtreme.h>
#include <lib/flipper_format/flipper_format.h>
#include <applications/main/archive/helpers/favorite_timeout.h>
#include <bt/bt_service/bt_i.h>
#include <bt/bt_service/bt.h>
@@ -116,7 +115,6 @@ BadKbApp* bad_kb_app_alloc(char* arg) {
app->file_path = furi_string_alloc();
app->keyboard_layout = furi_string_alloc();
process_favorite_launch(&arg);
if(arg && strlen(arg)) {
furi_string_set(app->file_path, arg);
}

View File

@@ -2,7 +2,6 @@
#include <string.h>
#include <dolphin/dolphin.h>
#include <applications/main/archive/helpers/favorite_timeout.h>
#define INFRARED_TX_MIN_INTERVAL_MS 50U
@@ -450,7 +449,6 @@ int32_t infrared_app(char* p) {
bool is_remote_loaded = false;
bool is_rpc_mode = false;
process_favorite_launch(&p);
if(p && strlen(p)) {
uint32_t rpc_ctx = 0;
if(sscanf(p, "RPC %lX", &rpc_ctx) == 1) {

View File

@@ -7,7 +7,6 @@
#include <furi_hal.h>
#include <portmacro.h>
#include <stdint.h>
#include <applications/main/archive/helpers/favorite_timeout.h>
static bool updater_custom_event_callback(void* context, uint32_t event) {
furi_assert(context);
@@ -35,7 +34,6 @@ static void
Updater* updater_alloc(char* arg) {
Updater* updater = malloc(sizeof(Updater));
process_favorite_launch(&arg);
if(arg && strlen(arg)) {
updater->startup_arg = furi_string_alloc_set(arg);
furi_string_replace(updater->startup_arg, ANY_PATH(""), EXT_PATH(""));