| 99 | } |
| 100 | |
| 101 | void UpdateOverlay::update(const InputState&) |
| 102 | { |
| 103 | if (!mFinished.load(std::memory_order_acquire)) { |
| 104 | return; |
| 105 | } |
| 106 | if (mWorker.joinable()) { |
| 107 | mWorker.join(); |
| 108 | } |
| 109 | |
| 110 | if (mOutcome == AutoUpdater::Outcome::Installed) { |
| 111 | // Leave the modal up: main() ends the loop on this call, so the last |
| 112 | // frame the user sees is the finished transfer rather than a flash of |
| 113 | // the title grid. |
| 114 | if (mOnInstalled) { |
| 115 | mOnInstalled(); |
| 116 | } |
| 117 | return; |
| 118 | } |
| 119 | |
| 120 | Screen& current = screen; |
| 121 | dismissThen([¤t]() { |
| 122 | std::shared_ptr<Overlay> error = std::make_shared<InfoOverlay>(current, i18n::t("updater.install_failed")); |
| 123 | current.setOverlay(error); |
| 124 | }); |
| 125 | } |
nothing calls this directly
no test coverage detected