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:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user