From b4ff8d62af8c3a0224ab581ba139a9508ed7ee2b Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Sun, 2 Jun 2024 10:37:39 +0300 Subject: [PATCH] server: support doccount data request So we can update doccount in mu4e after indexing --- lib/mu-server.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/mu-server.cc b/lib/mu-server.cc index edc63982..e18ae390 100644 --- a/lib/mu-server.cc +++ b/lib/mu-server.cc @@ -586,7 +586,9 @@ Server::Private::data_handler(const Command& cmd) { const auto request_type{unwrap(cmd.symbol_arg(":kind"))}; - if (request_type == "maildirs") { + if (request_type == "doccount") { + output(mu_format("(:doccount {})", store().size())); + } else if (request_type == "maildirs") { auto&& out{make_output_stream()}; mu_print(out, "("); for (auto&& mdir: store().maildirs())