Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the app crash when the first autoscan is completed after power on #471

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/ui/page_storage.c
Original file line number Diff line number Diff line change
Expand Up @@ -589,12 +589,19 @@ static void *page_storage_repair_thread(void *arg) {
char buf[128];
if (!page_storage.disable_controls) {
page_storage.is_auto_sd_repair_active = true;
pthread_mutex_lock(&lvgl_mutex);
disable_controls();
snprintf(buf, sizeof(buf), "%s, %s.", _lang("SD Card integrity check is active"), _lang("controls are disabled until process has completed"));
lv_label_set_text(page_storage.note, buf);
pthread_mutex_unlock(&lvgl_mutex);

page_storage_repair_sd();

pthread_mutex_lock(&lvgl_mutex);
enable_controls();
lv_label_set_text(page_storage.note, "");
pthread_mutex_unlock(&lvgl_mutex);

page_storage.is_auto_sd_repair_active = false;
}
page_storage.is_sd_repair_complete = true;
Expand Down
Loading