fix: better message seconds (thx to 64Gram)

This commit is contained in:
ZavaruKitsu 2023-08-01 11:23:40 +00:00
parent f9b7f42b13
commit 486e6e681c

View file

@ -472,7 +472,9 @@ void BottomInfo::layoutDateText() {
const auto prefix = !author.isEmpty() ? (author == settings->deletedMark ? u" "_q : u", "_q) : QString();
const auto date = edited + QLocale().toString(
_data.date.time(),
settings->showMessageSeconds ? QLocale::LongFormat : QLocale::ShortFormat);
settings->showMessageSeconds ? QLocale::system().timeFormat(QLocale::LongFormat).remove(" t")
: QLocale::system().timeFormat(QLocale::ShortFormat)
);
const auto afterAuthor = prefix + date;
const auto afterAuthorWidth = st::msgDateFont->width(afterAuthor);
const auto authorWidth = st::msgDateFont->width(author);