mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-29 13:47:47 +00:00
Show time of service message
This commit is contained in:
parent
d932e2f04f
commit
19e85616f7
@ -27,11 +27,19 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "window/window_session_controller.h"
|
||||
#include "storage/storage_shared_media.h"
|
||||
#include "ui/text_options.h"
|
||||
#include "base/unixtime.h"
|
||||
|
||||
namespace {
|
||||
|
||||
constexpr auto kPinnedMessageTextLimit = 16;
|
||||
|
||||
QString GenerateServiceTime(TimeId date) {
|
||||
if (date > 0) {
|
||||
return qs(" · ") + base::unixtime::parse(date).toString(cTimeFormat());
|
||||
}
|
||||
return QString();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
void HistoryService::setMessageByAction(const MTPmessageAction &action) {
|
||||
@ -577,7 +585,7 @@ ClickHandlerPtr HistoryService::fromLink() const {
|
||||
void HistoryService::setServiceText(const PreparedText &prepared) {
|
||||
_text.setText(
|
||||
st::serviceTextStyle,
|
||||
prepared.text,
|
||||
prepared.text + GenerateServiceTime(date()),
|
||||
Ui::ItemTextServiceOptions());
|
||||
auto linkIndex = 0;
|
||||
for_const (auto &link, prepared.links) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user