From c9447cc505e21ea448e365529e971826f97033f3 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Tue, 14 Feb 2017 10:37:41 -0800 Subject: recovery: Remember the last log position. After reading one log entry, it should stay at the same menu position. Test: 'View recovery logs' -> Read -> Exit Change-Id: I4b579be4c2fe1e3a1dcc4873e128fd0b2d619ba3 --- recovery.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recovery.cpp b/recovery.cpp index 8c214beb2..5c60ce655 100644 --- a/recovery.cpp +++ b/recovery.cpp @@ -972,8 +972,9 @@ static void choose_recovery_file(Device* device) { const char* headers[] = { "Select file to view", nullptr }; + int chosen_item = 0; while (true) { - int chosen_item = get_menu_selection(headers, entries, 1, 0, device); + chosen_item = get_menu_selection(headers, entries, 1, chosen_item, device); if (strcmp(entries[chosen_item], "Back") == 0) break; ui->ShowFile(entries[chosen_item]); -- cgit v1.2.3