From 18941421b57c91c49de094066ad152c911fca4a9 Mon Sep 17 00:00:00 2001 From: Alexander Kopachov Date: Wed, 26 Apr 2023 15:39:31 +0200 Subject: [PATCH] Moved FlipC screenshots (#143) * Moved FlipC screenshots according to https://github.com/playmean/fap-list/issues/12#issuecomment-1523386620 * Fixed code smell --- {.flipcorg => totp/.flipcorg}/gallery/1.png | Bin {.flipcorg => totp/.flipcorg}/gallery/2.png | Bin {.flipcorg => totp/.flipcorg}/gallery/3.png | Bin {.flipcorg => totp/.flipcorg}/gallery/4.png | Bin totp/services/config/token_info_iterator.c | 8 +++----- .../generate_token/totp_scene_generate_token.c | 2 +- 6 files changed, 4 insertions(+), 6 deletions(-) rename {.flipcorg => totp/.flipcorg}/gallery/1.png (100%) rename {.flipcorg => totp/.flipcorg}/gallery/2.png (100%) rename {.flipcorg => totp/.flipcorg}/gallery/3.png (100%) rename {.flipcorg => totp/.flipcorg}/gallery/4.png (100%) diff --git a/.flipcorg/gallery/1.png b/totp/.flipcorg/gallery/1.png similarity index 100% rename from .flipcorg/gallery/1.png rename to totp/.flipcorg/gallery/1.png diff --git a/.flipcorg/gallery/2.png b/totp/.flipcorg/gallery/2.png similarity index 100% rename from .flipcorg/gallery/2.png rename to totp/.flipcorg/gallery/2.png diff --git a/.flipcorg/gallery/3.png b/totp/.flipcorg/gallery/3.png similarity index 100% rename from .flipcorg/gallery/3.png rename to totp/.flipcorg/gallery/3.png diff --git a/.flipcorg/gallery/4.png b/totp/.flipcorg/gallery/4.png similarity index 100% rename from .flipcorg/gallery/4.png rename to totp/.flipcorg/gallery/4.png diff --git a/totp/services/config/token_info_iterator.c b/totp/services/config/token_info_iterator.c index e68ca561482..9b7dd5550cf 100644 --- a/totp/services/config/token_info_iterator.c +++ b/totp/services/config/token_info_iterator.c @@ -117,11 +117,9 @@ static bool ensure_stream_ends_with_lf(Stream* stream) { return false; } - if(last_char != '\n') { - const uint8_t lf = '\n'; - if(!stream_write(stream, &lf, 1)) { - return false; - } + const uint8_t lf = '\n'; + if(last_char != lf && !stream_write(stream, &lf, 1)) { + return false; } if(!stream_seek(stream, original_pos, StreamOffsetFromStart)) { diff --git a/totp/ui/scenes/generate_token/totp_scene_generate_token.c b/totp/ui/scenes/generate_token/totp_scene_generate_token.c index 0fb7c2294d3..aef379828bc 100644 --- a/totp/ui/scenes/generate_token/totp_scene_generate_token.c +++ b/totp/ui/scenes/generate_token/totp_scene_generate_token.c @@ -304,7 +304,7 @@ void totp_scene_generate_token_render(Canvas* const canvas, PluginState* plugin_ if(totp_token_info_iterator_get_total_count(iterator_context) > 1) { canvas_draw_icon(canvas, 0, SCREEN_HEIGHT_CENTER - 24, &I_totp_arrow_left_8x9); canvas_draw_icon( - canvas, SCREEN_WIDTH - 9, SCREEN_HEIGHT_CENTER - 24, &I_totp_arrow_right_8x9); + canvas, SCREEN_WIDTH - 8, SCREEN_HEIGHT_CENTER - 24, &I_totp_arrow_right_8x9); } #ifdef TOTP_AUTOMATION_ICONS_ENABLED