mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Add a couple of phrases for group wallpapers.
This commit is contained in:
parent
9f7ee3cafd
commit
18ca4a9eeb
3 changed files with 13 additions and 2 deletions
|
@ -867,6 +867,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
"lng_background_sure_delete" = "Are you sure you want to delete this background?";
|
"lng_background_sure_delete" = "Are you sure you want to delete this background?";
|
||||||
"lng_background_other_info" = "{user} will be able to apply this wallpaper";
|
"lng_background_other_info" = "{user} will be able to apply this wallpaper";
|
||||||
"lng_background_other_channel" = "All subscribers will see this wallpaper";
|
"lng_background_other_channel" = "All subscribers will see this wallpaper";
|
||||||
|
"lng_background_other_group" = "All members will see this wallpaper";
|
||||||
"lng_background_apply1" = "Apply the wallpaper in this chat.";
|
"lng_background_apply1" = "Apply the wallpaper in this chat.";
|
||||||
"lng_background_apply2" = "Enjoy the view.";
|
"lng_background_apply2" = "Enjoy the view.";
|
||||||
"lng_background_apply_button" = "Apply For This Chat";
|
"lng_background_apply_button" = "Apply For This Chat";
|
||||||
|
@ -876,6 +877,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
"lng_background_apply_me" = "Apply for me";
|
"lng_background_apply_me" = "Apply for me";
|
||||||
"lng_background_apply_both" = "Apply for me and {user}";
|
"lng_background_apply_both" = "Apply for me and {user}";
|
||||||
"lng_background_apply_channel" = "Apply For Channel";
|
"lng_background_apply_channel" = "Apply For Channel";
|
||||||
|
"lng_background_apply_group" = "Apply For Group";
|
||||||
|
|
||||||
"lng_download_path_ask" = "Ask download path for each file";
|
"lng_download_path_ask" = "Ask download path for each file";
|
||||||
"lng_download_path" = "Download path";
|
"lng_download_path" = "Download path";
|
||||||
|
|
|
@ -467,6 +467,10 @@ bool BackgroundPreviewBox::forChannel() const {
|
||||||
return _forPeer && _forPeer->isChannel();
|
return _forPeer && _forPeer->isChannel();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool BackgroundPreviewBox::forGroup() const {
|
||||||
|
return forChannel() && _forPeer->isMegagroup();
|
||||||
|
}
|
||||||
|
|
||||||
void BackgroundPreviewBox::generateBackground() {
|
void BackgroundPreviewBox::generateBackground() {
|
||||||
if (_paper.backgroundColors().empty()) {
|
if (_paper.backgroundColors().empty()) {
|
||||||
return;
|
return;
|
||||||
|
@ -492,7 +496,9 @@ void BackgroundPreviewBox::resetTitle() {
|
||||||
|
|
||||||
void BackgroundPreviewBox::rebuildButtons(bool dark) {
|
void BackgroundPreviewBox::rebuildButtons(bool dark) {
|
||||||
clearButtons();
|
clearButtons();
|
||||||
addButton(forChannel()
|
addButton(forGroup()
|
||||||
|
? tr::lng_background_apply_group()
|
||||||
|
: forChannel()
|
||||||
? tr::lng_background_apply_channel()
|
? tr::lng_background_apply_channel()
|
||||||
: _forPeer
|
: _forPeer
|
||||||
? tr::lng_background_apply_button()
|
? tr::lng_background_apply_button()
|
||||||
|
@ -1083,7 +1089,9 @@ void BackgroundPreviewBox::updateServiceBg(const std::vector<QColor> &bg) {
|
||||||
_service = GenerateServiceItem(
|
_service = GenerateServiceItem(
|
||||||
delegate(),
|
delegate(),
|
||||||
_serviceHistory,
|
_serviceHistory,
|
||||||
(forChannel()
|
(forGroup()
|
||||||
|
? tr::lng_background_other_group(tr::now)
|
||||||
|
: forChannel()
|
||||||
? tr::lng_background_other_channel(tr::now)
|
? tr::lng_background_other_channel(tr::now)
|
||||||
: (_forPeer && !_fromMessageId)
|
: (_forPeer && !_fromMessageId)
|
||||||
? tr::lng_background_other_info(
|
? tr::lng_background_other_info(
|
||||||
|
|
|
@ -95,6 +95,7 @@ private:
|
||||||
[[nodiscard]] OverridenStyle prepareOverridenStyle(bool dark);
|
[[nodiscard]] OverridenStyle prepareOverridenStyle(bool dark);
|
||||||
|
|
||||||
[[nodiscard]] bool forChannel() const;
|
[[nodiscard]] bool forChannel() const;
|
||||||
|
[[nodiscard]] bool forGroup() const;
|
||||||
void checkLevelForChannel();
|
void checkLevelForChannel();
|
||||||
|
|
||||||
void recreate(bool dark);
|
void recreate(bool dark);
|
||||||
|
|
Loading…
Add table
Reference in a new issue