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

Improve archive / unarchive story toast.

This commit is contained in:
John Preston
2023-06-23 20:39:57 +04:00
parent 3c44cf0251
commit 0183790518
2 changed files with 11 additions and 5 deletions

View File

@@ -1197,11 +1197,17 @@ void Stories::toggleHidden(
)).send();
}
const auto name = user->shortName();
const auto guard = gsl::finally([&] {
if (show) {
show->showToast(hidden
? tr::lng_stories_hidden_to_contacts(tr::now)
: tr::lng_stories_shown_in_chats(tr::now));
const auto phrase = hidden
? tr::lng_stories_hidden_to_contacts
: tr::lng_stories_shown_in_chats;
show->showToast(phrase(
tr::now,
lt_user,
Ui::Text::Bold(name),
Ui::Text::WithEntities));
}
});