Explorar o código

fix: remove haptic setting, cleanup

Struan Clark %!s(int64=2) %!d(string=hai) anos
pai
achega
7dceca60ef
Modificáronse 5 ficheiros con 3 adicións e 39 borrados
  1. 1 2
      flipbip.c
  2. 1 7
      flipbip.h
  3. 0 6
      helpers/flipbip_custom_event.h
  4. 1 1
      scenes/flipbip_scene_menu.c
  5. 0 23
      scenes/flipbip_scene_settings.c

+ 1 - 2
flipbip.c

@@ -6,7 +6,7 @@
 
 #define MNEMONIC_MENU_DEFAULT "Import mnemonic seed"
 #define MNEMONIC_MENU_SUCCESS "Import seed (success)"
-#define MNEMONIC_MENU_FAILURE "Import seed (failure)"
+#define MNEMONIC_MENU_FAILURE "Import seed (failed!)"
 
 bool flipbip_custom_event_callback(void* context, uint32_t event) {
     furi_assert(context);
@@ -112,7 +112,6 @@ FlipBip* flipbip_app_alloc() {
     app->submenu = submenu_alloc();
 
     // Settings
-    app->haptic = FlipBipHapticOn;
     app->bip39_strength = FlipBipStrength256; // 256 bits (24 words)
     app->passphrase = FlipBipPassphraseOff;
 

+ 1 - 7
flipbip.h

@@ -14,7 +14,7 @@
 #include "scenes/flipbip_scene.h"
 #include "views/flipbip_scene_1.h"
 
-#define FLIPBIP_VERSION "v1.13.0"
+#define FLIPBIP_VERSION "v1.13"
 
 #define COIN_BTC 0
 #define COIN_DOGE 3
@@ -34,7 +34,6 @@ typedef struct {
     FlipBipScene1* flipbip_scene_1;
     char* mnemonic_menu_text;
     // Settings options
-    int haptic;
     int bip39_strength;
     int passphrase;
     // Main menu options
@@ -56,11 +55,6 @@ typedef enum {
     FlipBipViewIdTextInput,
 } FlipBipViewId;
 
-typedef enum {
-    FlipBipHapticOff,
-    FlipBipHapticOn,
-} FlipBipHapticState;
-
 typedef enum {
     FlipBipStrength128,
     FlipBipStrength192,

+ 0 - 6
helpers/flipbip_custom_event.h

@@ -1,12 +1,6 @@
 #pragma once
 
 typedef enum {
-    FlipBipCustomEventStartscreenUp,
-    FlipBipCustomEventStartscreenDown,
-    FlipBipCustomEventStartscreenLeft,
-    FlipBipCustomEventStartscreenRight,
-    FlipBipCustomEventStartscreenOk,
-    FlipBipCustomEventStartscreenBack,
     FlipBipCustomEventScene1Up,
     FlipBipCustomEventScene1Down,
     FlipBipCustomEventScene1Left,

+ 1 - 1
scenes/flipbip_scene_menu.c

@@ -1,7 +1,7 @@
 #include "../flipbip.h"
 #include "../helpers/flipbip_file.h"
 
-#define FLIPBIP_SUBMENU_TEXT "* FlipBIP wallet " FLIPBIP_VERSION " *"
+#define FLIPBIP_SUBMENU_TEXT "** FlipBIP wallet " FLIPBIP_VERSION " **"
 
 enum SubmenuIndex {
     SubmenuIndexScene1BTC = 10,

+ 0 - 23
scenes/flipbip_scene_settings.c

@@ -6,15 +6,6 @@
 #define TEXT_LABEL_ON "ON"
 #define TEXT_LABEL_OFF "OFF"
 
-const char* const haptic_text[2] = {
-    TEXT_LABEL_OFF,
-    TEXT_LABEL_ON,
-};
-const uint32_t haptic_value[2] = {
-    FlipBipHapticOff,
-    FlipBipHapticOn,
-};
-
 const char* const bip39_strength_text[3] = {
     "12",
     "18",
@@ -35,13 +26,6 @@ const uint32_t passphrase_value[2] = {
     FlipBipPassphraseOn,
 };
 
-static void flipbip_scene_settings_set_haptic(VariableItem* item) {
-    FlipBip* app = variable_item_get_context(item);
-    uint8_t index = variable_item_get_current_value_index(item);
-    variable_item_set_current_value_text(item, haptic_text[index]);
-    app->haptic = haptic_value[index];
-}
-
 static void flipbip_scene_settings_set_bip39_strength(VariableItem* item) {
     FlipBip* app = variable_item_get_context(item);
     uint8_t index = variable_item_get_current_value_index(item);
@@ -92,13 +76,6 @@ void flipbip_scene_settings_on_enter(void* context) {
     variable_item_set_current_value_index(item, value_index);
     variable_item_set_current_value_text(item, passphrase_text[value_index]);
 
-    // Vibro on/off
-    item = variable_item_list_add(
-        app->variable_item_list, "Vibro/Haptic:", 2, flipbip_scene_settings_set_haptic, app);
-    value_index = value_index_uint32(app->haptic, haptic_value, 2);
-    variable_item_set_current_value_index(item, value_index);
-    variable_item_set_current_value_text(item, haptic_text[value_index]);
-
     view_dispatcher_switch_to_view(app->view_dispatcher, FlipBipViewIdSettings);
 }