Explorar o código

Few tweaks for OFW catalog (#161)

* Few tweaks for OFW catalog

* Updated firmware submodules

* Dropped some legacy stuff
Alexander Kopachov %!s(int64=2) %!d(string=hai) anos
pai
achega
ab7bbb9b73
Modificáronse 3 ficheiros con 5 adicións e 26 borrados
  1. 2 1
      application.fam
  2. 3 2
      features_config.h
  3. 0 23
      services/config/config.c

+ 2 - 1
application.fam

@@ -15,10 +15,11 @@ App(
     ],
     stack_size=2 * 1024,
     order=20,
+    fap_version="2.23",
     fap_author="Alexander Kopachov (@akopachov)",
     fap_description="Software-based TOTP authenticator for Flipper Zero device",
     fap_weburl="https://github.com/akopachov/flipper-zero_authenticator",
-    fap_category="Misc",
+    fap_category="Tools",
     fap_icon_assets="images",
     fap_icon="totp_10px.png",
     fap_private_libs=[

+ 3 - 2
features_config.h

@@ -29,9 +29,10 @@
 #endif
 // End of FlipC.org definition checks
 
-// If target firmware is not yet set, default it to Xtreme\Unleashed as I'm using it, and it is cool :)
+// If target firmware is not yet set, default it to OFW because there is no chance to force Flipper Devices to update their build pipelines :angry:. 
+// I'm still using Xtreme firmware, it is still the best one and I highly recommend it to everybody.
 #ifndef TOTP_TARGET_FIRMWARE
-#define TOTP_TARGET_FIRMWARE TOTP_FIRMWARE_XTREME_UL
+#define TOTP_TARGET_FIRMWARE TOTP_FIRMWARE_OFFICIAL_STABLE
 #endif
 
 // List of available font for TOTP code

+ 0 - 23
services/config/config.c

@@ -15,9 +15,6 @@
 #define CONFIG_FILE_PATH CONFIG_FILE_DIRECTORY_PATH "/totp.conf"
 #define CONFIG_FILE_BACKUP_DIR CONFIG_FILE_DIRECTORY_PATH "/backups"
 #define CONFIG_FILE_BACKUP_BASE_PATH CONFIG_FILE_BACKUP_DIR "/totp.conf"
-#define CONFIG_FILE_TEMP_PATH CONFIG_FILE_PATH ".tmp"
-#define CONFIG_FILE_ORIG_PATH CONFIG_FILE_PATH ".orig"
-#define CONFIG_FILE_PATH_PREVIOUS EXT_PATH("apps/Misc") "/totp.conf"
 
 struct ConfigFileContext {
     /**
@@ -120,26 +117,6 @@ static bool totp_open_config_file(Storage* storage, FlipperFormat** file) {
             totp_close_config_file(fff_data_file);
             return false;
         }
-    } else if(storage_common_stat(storage, CONFIG_FILE_PATH_PREVIOUS, NULL) == FSE_OK) {
-        FURI_LOG_D(LOGGING_TAG, "Old config file %s found", CONFIG_FILE_PATH_PREVIOUS);
-        if(storage_common_stat(storage, CONFIG_FILE_DIRECTORY_PATH, NULL) == FSE_NOT_EXIST) {
-            FURI_LOG_D(
-                LOGGING_TAG,
-                "Directory %s doesn't exist. Will create new.",
-                CONFIG_FILE_DIRECTORY_PATH);
-            if(!storage_simply_mkdir(storage, CONFIG_FILE_DIRECTORY_PATH)) {
-                FURI_LOG_E(LOGGING_TAG, "Error creating directory %s", CONFIG_FILE_DIRECTORY_PATH);
-                totp_close_config_file(fff_data_file);
-                return false;
-            }
-        }
-        if(storage_common_rename(storage, CONFIG_FILE_PATH_PREVIOUS, CONFIG_FILE_PATH) != FSE_OK) {
-            FURI_LOG_E(LOGGING_TAG, "Error moving config to %s", CONFIG_FILE_PATH);
-            totp_close_config_file(fff_data_file);
-            return false;
-        }
-        FURI_LOG_I(LOGGING_TAG, "Applied config file path migration");
-        return totp_open_config_file(storage, file);
     } else {
         FURI_LOG_D(LOGGING_TAG, "Config file %s is not found. Will create new.", CONFIG_FILE_PATH);
         if(storage_common_stat(storage, CONFIG_FILE_DIRECTORY_PATH, NULL) == FSE_NOT_EXIST) {