Skip to content

Commit

Permalink
fix: text input behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
xtruan committed Aug 11, 2023
1 parent 39c8dfe commit 49a22aa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
12 changes: 6 additions & 6 deletions flipbip.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include "flipbip.h"
#include "helpers/flipbip_file.h"
//#include "helpers/flipbip_haptic.h"
// From: lib/crypto
#include <memzero.h>
#include <bip39.h>
Expand Down Expand Up @@ -44,7 +43,8 @@ static void text_input_callback(void* context) {
// reset input state
app->input_state = FlipBipTextInputDefault;
handled = true;
//view_dispatcher_switch_to_view(app->view_dispatcher, FlipBipViewIdSettings);
// switch back to settings view
view_dispatcher_switch_to_view(app->view_dispatcher, FlipBipViewIdSettings);
} else if(app->input_state == FlipBipTextInputMnemonic) {
if(app->import_from_mnemonic == 1) {
strcpy(app->import_mnemonic_text, app->input_text);
Expand Down Expand Up @@ -85,7 +85,8 @@ static void text_input_callback(void* context) {
memzero(app->input_text, TEXT_BUFFER_SIZE);
// reset input state
app->input_state = FlipBipTextInputDefault;
//view_dispatcher_switch_to_view(app->view_dispatcher, FlipBipViewIdMenu);
// something went wrong, switch to menu view
view_dispatcher_switch_to_view(app->view_dispatcher, FlipBipViewIdMenu);
}
}

Expand Down Expand Up @@ -191,9 +192,8 @@ int32_t flipbip_app(void* p) {

view_dispatcher_attach_to_gui(app->view_dispatcher, app->gui, ViewDispatcherTypeFullscreen);

scene_manager_next_scene(app->scene_manager, FlipBipSceneMenu); //Start with start screen
//scene_manager_next_scene(app->scene_manager, FlipBipSceneMenu); //if you want to directly start with Menu

scene_manager_next_scene(app->scene_manager, FlipBipSceneMenu); //Start with menu

furi_hal_power_suppress_charge_enter();

view_dispatcher_run(app->view_dispatcher);
Expand Down
1 change: 0 additions & 1 deletion views/flipbip_scene_1.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include <storage/storage.h>
#include <string.h>
//#include "flipbip_icons.h"
//#include "../helpers/flipbip_haptic.h"
#include "../helpers/flipbip_string.h"
#include "../helpers/flipbip_file.h"
// From: /lib/crypto
Expand Down

0 comments on commit 49a22aa

Please sign in to comment.