De-xtreme-ify the code

This commit is contained in:
VerstreuteSeele
2023-02-11 16:13:49 +01:00
parent 6b99999566
commit 371f3b3869
3 changed files with 10 additions and 16 deletions

View File

@@ -6,7 +6,6 @@
#include <m-string.h>
#include <storage/storage.h>
#include "toolbox/path.h"
#include "../../../settings/xtreme_settings/xtreme_settings.h"
#define FAP_MANIFEST_MAX_ICON_SIZE 32
@@ -85,13 +84,11 @@ static void ArchiveFile_t_clear(ArchiveFile_t* obj) {
}
static int ArchiveFile_t_cmp(const ArchiveFile_t* a, const ArchiveFile_t* b) {
if(!XTREME_SETTINGS()->sort_ignore_dirs) {
if(a->type == ArchiveFileTypeFolder && b->type != ArchiveFileTypeFolder) {
return -1;
}
if(a->type != ArchiveFileTypeFolder && b->type == ArchiveFileTypeFolder) {
return 1;
}
if(a->type == ArchiveFileTypeFolder && b->type != ArchiveFileTypeFolder) {
return -1;
}
if(a->type != ArchiveFileTypeFolder && b->type == ArchiveFileTypeFolder) {
return 1;
}
return furi_string_cmpi(a->path, b->path);