[FL-1690] Archive app: favorites.txt (#662)

* Archive: file parsing wip
* Archive: favorites.txt read, open keys
* Archive: add to fav/ delete works
* Archive: newline fix
* Archive: refactoring 1/2
* Archive: delete from favorites too if pinned
* Archive: rename handling and refactoring
* Archive: cleanups
* Archive: file_worker fix
* Archive: fix offset issue + cleanups
* Archive: favorites on internal storage

Co-authored-by: Anna Prosvetova <anna@prosvetova.me>
Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
its your bedtime
2021-08-28 14:46:11 +03:00
committed by GitHub
parent 941b733046
commit 1b6a942f4a
3 changed files with 271 additions and 94 deletions

View File

@@ -13,10 +13,13 @@
#include <storage/storage.h>
#include "archive_views.h"
#include "applications.h"
#include "file-worker.h"
#define MAX_DEPTH 32
#define MAX_FILES 100 //temp
#define MAX_FILE_SIZE 128
#define ARCHIVE_FAV_PATH "/any/favorites.txt"
#define ARCHIVE_FAV_TEMP_PATH "/any/favorites.tmp"
typedef enum {
ArchiveViewMain,
@@ -101,6 +104,13 @@ typedef struct {
EventType type;
} AppEvent;
typedef enum {
FavoritesCheck,
FavoritesRead,
FavoritesDelete,
FavoritesRename,
} FavActionsEnum;
typedef struct {
ArchiveTabEnum tab_id;
string_t name;
@@ -123,5 +133,6 @@ struct ArchiveApp {
TextInput* text_input;
Storage* api;
FileWorker* file_worker;
ArchiveBrowser browser;
};