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.
This commit is contained in:
Joshua Goins
2023-10-19 16:41:06 -04:00
parent 83b7e7d121
commit 25d0368d41

View File

@@ -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<RoomEvent>(event->fullJson());