mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-05 09:05:14 +00:00
Add other additional data export.
This commit is contained in:
@@ -762,6 +762,15 @@ Result TextWriter::writeWebSessions(const Data::SessionsList &data) {
|
||||
return _summary->writeBlock(header);
|
||||
}
|
||||
|
||||
Result TextWriter::writeOtherData(const Data::File &data) {
|
||||
Expects(_summary != nullptr);
|
||||
|
||||
const auto header = "Other data - " + data.relativePath.toUtf8()
|
||||
+ kLineBreak
|
||||
+ kLineBreak;
|
||||
return _summary->writeBlock(header);
|
||||
}
|
||||
|
||||
Result TextWriter::writeDialogsStart(const Data::DialogsInfo &data) {
|
||||
return writeChatsStart(
|
||||
data,
|
||||
@@ -864,7 +873,9 @@ Result TextWriter::writeChatSlice(const Data::MessagesSlice &data) {
|
||||
data.peers,
|
||||
_settings.internalLinksDomain));
|
||||
}
|
||||
const auto full = kLineBreak + JoinList(kLineBreak, list);
|
||||
const auto full = _chat->empty()
|
||||
? JoinList(kLineBreak, list)
|
||||
: kLineBreak + JoinList(kLineBreak, list);
|
||||
return _chat->writeBlock(full);
|
||||
}
|
||||
|
||||
@@ -911,7 +922,7 @@ Result TextWriter::writeChatEnd() {
|
||||
}
|
||||
Unexpected("Dialog type in TypeString.");
|
||||
};
|
||||
return _chats->writeBlock(SerializeKeyValue({
|
||||
return _chats->writeBlock(kLineBreak + SerializeKeyValue({
|
||||
{ "Name", NameString(_dialog, _dialog.type) },
|
||||
{ "Type", TypeString(_dialog.type) },
|
||||
{
|
||||
@@ -926,7 +937,7 @@ Result TextWriter::writeChatEnd() {
|
||||
? (_dialog.relativePath + "messages.txt").toUtf8()
|
||||
: QByteArray())
|
||||
}
|
||||
}) + kLineBreak);
|
||||
}));
|
||||
}
|
||||
|
||||
Result TextWriter::writeChatsEnd() {
|
||||
|
Reference in New Issue
Block a user