MCPcopy Create free account
hub / github.com/crosspoint-reader/crosspoint-reader / refreshIfDirty

Method refreshIfDirty

src/SdCardFontSystem.h:42–46  ·  view source on GitHub ↗

If the registry is dirty, re-scan the SD card now and clear the flag. Used by the web UI so uploaded/deleted fonts appear in the list without waiting for the reader activity to run ensureLoaded().

Source from the content-addressed store, hash-verified

40 /// Used by the web UI so uploaded/deleted fonts appear in the list
41 /// without waiting for the reader activity to run ensureLoaded().
42 void refreshIfDirty() {
43 if (registryDirty_.exchange(false, std::memory_order_acquire)) {
44 registry_.discover();
45 }
46 }
47
48 private:
49 SdCardFontRegistry registry_;

Callers 2

handleFontListMethod · 0.80
rebuildSettingsListsMethod · 0.80

Calls 1

discoverMethod · 0.80

Tested by

no test coverage detected