mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-16 04:24:45 -07:00
Update TOTP
This commit is contained in:
6
applications/external/totp/totp_app.c
vendored
6
applications/external/totp/totp_app.c
vendored
@@ -20,7 +20,7 @@
|
||||
#include "services/crypto/crypto.h"
|
||||
#include "cli/cli.h"
|
||||
|
||||
#define IDLE_TIMEOUT 60000
|
||||
#define IDLE_TIMEOUT (60000)
|
||||
|
||||
static void render_callback(Canvas* const canvas, void* ctx) {
|
||||
furi_assert(ctx);
|
||||
@@ -96,6 +96,7 @@ static bool totp_plugin_state_init(PluginState* const plugin_state) {
|
||||
plugin_state->gui = furi_record_open(RECORD_GUI);
|
||||
plugin_state->notification_app = furi_record_open(RECORD_NOTIFICATION);
|
||||
plugin_state->dialogs_app = furi_record_open(RECORD_DIALOGS);
|
||||
memset(&plugin_state->iv[0], 0, TOTP_IV_SIZE);
|
||||
|
||||
if(totp_config_file_load_base(plugin_state) != TotpConfigFileOpenSuccess) {
|
||||
totp_dialogs_config_loading_error(plugin_state);
|
||||
@@ -161,7 +162,7 @@ int32_t totp_app() {
|
||||
}
|
||||
|
||||
TotpCliContext* cli_context = totp_cli_register_command_handler(plugin_state, event_queue);
|
||||
totp_scene_director_init_scenes(plugin_state);
|
||||
|
||||
if(!totp_activate_initial_scene(plugin_state)) {
|
||||
FURI_LOG_E(LOGGING_TAG, "An error ocurred during activating initial scene\r\n");
|
||||
totp_plugin_state_free(plugin_state);
|
||||
@@ -206,7 +207,6 @@ int32_t totp_app() {
|
||||
|
||||
totp_cli_unregister_command_handler(cli_context);
|
||||
totp_scene_director_deactivate_active_scene(plugin_state);
|
||||
totp_scene_director_dispose(plugin_state);
|
||||
|
||||
view_port_enabled_set(view_port, false);
|
||||
gui_remove_view_port(plugin_state->gui, view_port);
|
||||
|
||||
Reference in New Issue
Block a user