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().
| 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_; |
no test coverage detected