[FL-1477] Archive improvements (#541)

* various small issues fixes
* proper fadding to favourites
* cleanups
* fix infrared extension
* allow subdirs in app tabs
* fix elements_scrollbar args
* bugfixes, looping list, halfbaked pinning
* pinning
* ui updates

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
its your bedtime
2021-06-25 19:57:42 +03:00
committed by GitHub
parent c583cce5bd
commit 9d23602968
6 changed files with 201 additions and 82 deletions

View File

@@ -16,6 +16,7 @@
#define MAX_DEPTH 32
#define MAX_FILES 100 //temp
#define MAX_FILE_SIZE 128
typedef enum {
ArchiveViewMain,
@@ -23,17 +24,6 @@ typedef enum {
ArchiveViewTotal,
} ArchiveViewEnum;
typedef enum {
ArchiveTabFavourites,
ArchiveTabIButton,
ArchiveTabNFC,
ArchiveTabSubOne,
ArchiveTabLFRFID,
ArchiveTabIrda,
ArchiveTabBrowser,
ArchiveTabTotal,
} ArchiveTabEnum;
static const char* flipper_app_name[] = {
[ArchiveFileTypeIButton] = "iButton",
[ArchiveFileTypeNFC] = "NFC",
@@ -77,6 +67,23 @@ static inline const char* get_tab_ext(ArchiveTabEnum tab) {
}
}
static inline const char* get_default_path(ArchiveFileTypeEnum type) {
switch(type) {
case ArchiveFileTypeIButton:
return tab_default_paths[ArchiveTabIButton];
case ArchiveFileTypeNFC:
return tab_default_paths[ArchiveTabNFC];
case ArchiveFileTypeSubOne:
return tab_default_paths[ArchiveTabSubOne];
case ArchiveFileTypeLFRFID:
return tab_default_paths[ArchiveTabLFRFID];
case ArchiveFileTypeIrda:
return tab_default_paths[ArchiveTabIrda];
default:
return false;
}
}
typedef enum {
EventTypeTick,
EventTypeKey,