Merge branch 'dev' of https://github.com/DarkFlippers/unleashed-firmware into xfw-dev --nobuild

This commit is contained in:
Willy-JL
2023-09-02 16:19:45 +02:00
53 changed files with 782 additions and 305 deletions

View File

@@ -1,6 +1,6 @@
#include <lib/toolbox/random_name.h>
#include "../lfrfid_i.h"
#include <dolphin/dolphin.h>
#include <toolbox/name_generator.h>
void lfrfid_scene_save_name_on_enter(void* context) {
LfRfid* app = context;
@@ -11,7 +11,10 @@ void lfrfid_scene_save_name_on_enter(void* context) {
bool key_name_is_empty = furi_string_empty(app->file_name);
if(key_name_is_empty) {
furi_string_set(app->file_path, LFRFID_APP_FOLDER);
set_random_name(app->text_store, LFRFID_TEXT_STORE_SIZE);
name_generator_make_auto(
app->text_store, LFRFID_TEXT_STORE_SIZE, LFRFID_APP_FILENAME_PREFIX);
furi_string_set(folder_path, LFRFID_APP_FOLDER);
} else {
lfrfid_text_store_set(app, "%s", furi_string_get_cstr(app->file_name));
@@ -31,7 +34,7 @@ void lfrfid_scene_save_name_on_enter(void* context) {
ValidatorIsFile* validator_is_file = validator_is_file_alloc_init(
furi_string_get_cstr(folder_path),
LFRFID_APP_EXTENSION,
LFRFID_APP_FILENAME_EXTENSION,
furi_string_get_cstr(app->file_name));
text_input_set_validator(text_input, validator_is_file_callback, validator_is_file);