mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Add a couple of phrases for group wallpapers.
This commit is contained in:
@@ -467,6 +467,10 @@ bool BackgroundPreviewBox::forChannel() const {
|
||||
return _forPeer && _forPeer->isChannel();
|
||||
}
|
||||
|
||||
bool BackgroundPreviewBox::forGroup() const {
|
||||
return forChannel() && _forPeer->isMegagroup();
|
||||
}
|
||||
|
||||
void BackgroundPreviewBox::generateBackground() {
|
||||
if (_paper.backgroundColors().empty()) {
|
||||
return;
|
||||
@@ -492,7 +496,9 @@ void BackgroundPreviewBox::resetTitle() {
|
||||
|
||||
void BackgroundPreviewBox::rebuildButtons(bool dark) {
|
||||
clearButtons();
|
||||
addButton(forChannel()
|
||||
addButton(forGroup()
|
||||
? tr::lng_background_apply_group()
|
||||
: forChannel()
|
||||
? tr::lng_background_apply_channel()
|
||||
: _forPeer
|
||||
? tr::lng_background_apply_button()
|
||||
@@ -1083,7 +1089,9 @@ void BackgroundPreviewBox::updateServiceBg(const std::vector<QColor> &bg) {
|
||||
_service = GenerateServiceItem(
|
||||
delegate(),
|
||||
_serviceHistory,
|
||||
(forChannel()
|
||||
(forGroup()
|
||||
? tr::lng_background_other_group(tr::now)
|
||||
: forChannel()
|
||||
? tr::lng_background_other_channel(tr::now)
|
||||
: (_forPeer && !_fromMessageId)
|
||||
? tr::lng_background_other_info(
|
||||
|
@@ -95,6 +95,7 @@ private:
|
||||
[[nodiscard]] OverridenStyle prepareOverridenStyle(bool dark);
|
||||
|
||||
[[nodiscard]] bool forChannel() const;
|
||||
[[nodiscard]] bool forGroup() const;
|
||||
void checkLevelForChannel();
|
||||
|
||||
void recreate(bool dark);
|
||||
|
Reference in New Issue
Block a user