2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Improved html message layout.

This commit is contained in:
John Preston
2018-07-04 00:09:25 +01:00
parent eeb1a6b769
commit cb8ff398a5
42 changed files with 895 additions and 366 deletions

View File

@@ -197,7 +197,11 @@ Stats AbstractWriter::produceTestExample(
message.id = counter();
message.date = prevdate();
message.edited = date();
message.forwardedFromId = user.info.userId;
static auto count = 0;
if (++count % 3 == 0) {
message.forwardedFromId = Data::UserPeerId(user.info.userId);
message.forwardedDate = date();
}
message.fromId = user.info.userId;
message.replyToMsgId = counter();
message.viaBotId = bot.info.userId;
@@ -485,6 +489,5 @@ Stats AbstractWriter::produceTestExample(
return result;
}
} // namespace Output
} // namespace Export

File diff suppressed because it is too large Load Diff

View File

@@ -35,6 +35,8 @@ private:
};
struct UserpicData;
struct PeersMap;
struct MediaData;
} // namespace details
@@ -84,7 +86,9 @@ public:
private:
using Context = details::HtmlContext;
using UserpicData = details::UserpicData;
using MediaData = details::MediaData;
class Wrap;
struct MessageInfo;
[[nodiscard]] Result copyFile(
const QString &source,
@@ -104,6 +108,7 @@ private:
[[nodiscard]] Result writeChatsStart(
const Data::DialogsInfo &data,
const QByteArray &listName,
const QByteArray &buttonClass,
const QByteArray &about,
const QString &fileName);
[[nodiscard]] Result writeChatStart(const Data::DialogInfo &data);
@@ -153,7 +158,7 @@ private:
Data::DialogInfo _dialog;
int _messagesCount = 0;
TimeId _lastMessageDate = 0;
std::unique_ptr<MessageInfo> _lastMessageInfo;
int _dateMessageId = 0;
std::unique_ptr<Wrap> _chats;
std::unique_ptr<Wrap> _chat;