Skip to content

Commit

Permalink
fix: compatibility with obsolete firmwares
Browse files Browse the repository at this point in the history
  • Loading branch information
akopachov committed Feb 5, 2024
1 parent c7f5fcf commit 02bfe65
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions totp/ui/scenes/authenticate/totp_scene_authenticate.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#include "totp_scene_authenticate.h"
#include <dialogs/dialogs.h>
#include <totp_icons.h>
#if __has_include(<assets_icons.h>)
#include <assets_icons.h>
#endif
#include "../../../types/common.h"
#include "../../constants.h"
#include "../../../services/config/config.h"
Expand Down Expand Up @@ -146,7 +148,11 @@ bool totp_scene_authenticate_handle_event(
SCREEN_HEIGHT_CENTER - 5,
AlignCenter,
AlignCenter);
#if __has_include(<assets_icons.h>)
dialog_message_set_icon(message, &I_WarningDolphinFlip_45x42, 83, 22);
#else
dialog_message_set_icon(message, &I_DolphinCommon_56x48, 72, 17);
#endif
dialog_message_show(plugin_state->dialogs_app, message);
dialog_message_free(message);
}
Expand Down
6 changes: 6 additions & 0 deletions totp/ui/scenes/standby/standby.c
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
#include "standby.h"
#if __has_include(<assets_icons.h>)
#include <assets_icons.h>
#endif
#include <totp_icons.h>
#include "../../constants.h"

void totp_scene_standby_render(Canvas* const canvas) {
#if __has_include(<assets_icons.h>)
canvas_draw_icon(canvas, SCREEN_WIDTH - 50, SCREEN_HEIGHT - 44, &I_WarningDolphinFlip_45x42);
#else
canvas_draw_icon(canvas, SCREEN_WIDTH - 56, SCREEN_HEIGHT - 48, &I_DolphinCommon_56x48);
#endif

canvas_set_font(canvas, FontPrimary);
canvas_draw_str_aligned(canvas, 5, 10, AlignLeft, AlignTop, "CLI command");
Expand Down

0 comments on commit 02bfe65

Please sign in to comment.