Skip to content

Commit

Permalink
Merge pull request #471 from ligenxxxx/fix-app-freeze-after-auto-scan
Browse files Browse the repository at this point in the history
Fix the app crash when the first autoscan is completed after power on
  • Loading branch information
ligenxxxx authored Jan 13, 2025
2 parents 42457ea + 0e9ddec commit ee0c483
Showing 1 changed file with 7 additions and 0 deletions.
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

0 comments on commit ee0c483

Please sign in to comment.