labels: allow restoring cache-map
E.g. with unexpected termination for mu it is possible that the labels-cache (i.e., the one that is used for auto-completion) gets disconnected from reality. Add a --restore option to `mu label list` to restore the actual labels from the labels seen in the store.
This commit is contained in:
@ -694,6 +694,14 @@ Store::clear_labels(Message& message)
|
||||
return Ok(std::move(updates));
|
||||
}
|
||||
|
||||
Result<void>
|
||||
Store::restore_label_map()
|
||||
{
|
||||
std::unique_lock lock{priv_->lock_};
|
||||
|
||||
return priv_->labels_cache_.restore(*this);
|
||||
}
|
||||
|
||||
LabelsCache::Map
|
||||
Store::label_map() const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user