mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-18 23:27:09 +02:00
Improve pinned messages title.
This commit is contained in:
parent
2233058ae0
commit
e4f039b141
1 changed files with 4 additions and 2 deletions
|
@ -125,9 +125,11 @@ auto WithPinnedTitle(not_null<Main::Session*> session, PinnedId id) {
|
|||
}
|
||||
content.title = (id.index + 1 >= id.count)
|
||||
? tr::lng_pinned_message(tr::now)
|
||||
: (tr::lng_pinned_message(tr::now) // #TODO pinned
|
||||
: (id.count == 2)
|
||||
? tr::lng_pinned_previous(tr::now)
|
||||
: (tr::lng_pinned_message(tr::now)
|
||||
+ " #"
|
||||
+ QString::number(id.count - id.index));
|
||||
+ QString::number(id.index + 1));
|
||||
content.count = std::max(id.count, 1);
|
||||
content.index = std::clamp(id.index, 0, content.count - 1);
|
||||
return std::move(content);
|
||||
|
|
Loading…
Add table
Reference in a new issue