diff --git a/Core/Util/RecentFiles.cpp b/Core/Util/RecentFiles.cpp index eb06d673e6..785a537e73 100644 --- a/Core/Util/RecentFiles.cpp +++ b/Core/Util/RecentFiles.cpp @@ -101,6 +101,12 @@ void RecentFilesManager::Load(const Section *recent, int maxRecent) { // Just zapping any pending command, since they won't matter after this. // TODO: Maybe we should let adds through... WipePendingCommandsUnderLock(); + // Visible right away, for callers that read the list straight after loading the config (Android's + // URI grant pruning). The queued ReplaceAll still runs, in case a command was mid-flight. + { + std::lock_guard recentGuard(recentLock_); + recentFiles_ = newRecent; + } cmds_.push(RecentCommand{ RecentCmd::ReplaceAll, std::make_unique>(newRecent) }); cmdCondVar_.notify_one(); }