| 140 | } |
| 141 | |
| 142 | void PersistentStore::removeAll(Function<void(Result<Void>)> completion) { |
| 143 | _dispatchQueue->async([self = strongRef(this), completion = std::move(completion)]() { |
| 144 | self->_store.removeAll(); |
| 145 | self->scheduleSave(completion); |
| 146 | }); |
| 147 | } |
| 148 | |
| 149 | void PersistentStore::scheduleSave(Function<void(Result<Void>)> completion) { |
| 150 | auto wasEmpty = _pendingSaves.empty(); |
nothing calls this directly
no test coverage detected