mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-28 16:29:53 +00:00
cTimeFormat/cDateFormat -> QLocale::ShortFormat
This allows to use platform-specific formatting functions
This commit is contained in:
@@ -79,12 +79,16 @@ Authorizations::Entry ParseEntry(const MTPDauthorization &data) {
|
||||
const auto nowDate = now.date();
|
||||
const auto lastDate = lastTime.date();
|
||||
if (lastDate == nowDate) {
|
||||
result.active = QLocale().toString(lastTime, cTimeFormat());
|
||||
result.active = QLocale().toString(
|
||||
lastTime.time(),
|
||||
QLocale::ShortFormat);
|
||||
} else if (lastDate.year() == nowDate.year()
|
||||
&& lastDate.weekNumber() == nowDate.weekNumber()) {
|
||||
result.active = langDayOfWeek(lastDate);
|
||||
} else {
|
||||
result.active = QLocale().toString(lastDate, cDateFormat());
|
||||
result.active = QLocale().toString(
|
||||
lastDate,
|
||||
QLocale::ShortFormat);
|
||||
}
|
||||
}
|
||||
result.location = country;
|
||||
|
||||
Reference in New Issue
Block a user