From 25d0368d4108141e4d288b4a36bc721727320c53 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Thu, 19 Oct 2023 16:41:06 -0400 Subject: [PATCH] Compact the event cache JSON By default, Qt will spit out indented JSON when writing to the config file, which is useless as it wastes space and no one will read this. --- src/neochatroom.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/neochatroom.cpp b/src/neochatroom.cpp index ce7a161ba..517fffc5c 100644 --- a/src/neochatroom.cpp +++ b/src/neochatroom.cpp @@ -316,7 +316,7 @@ void NeoChatRoom::cacheLastEvent() if (event != nullptr) { auto &roomLastMessageProvider = RoomLastMessageProvider::self(); - auto eventJson = QJsonDocument(event->fullJson()).toJson(); + auto eventJson = QJsonDocument(event->fullJson()).toJson(QJsonDocument::Compact); roomLastMessageProvider.write(id(), eventJson); auto uniqueEvent = loadEvent(event->fullJson());