chore: fix some warnings

This commit is contained in:
AlexeyZavar
2026-03-07 18:25:00 +03:00
parent 8bd64c62c2
commit b4c04bd3b5
6 changed files with 8 additions and 11 deletions
@@ -224,7 +224,7 @@ bool isAyuForwardNeeded(const std::vector<not_null<HistoryItem*>> &items) {
}
bool isAyuForwardNeeded(not_null<HistoryItem*> item) {
if (item->isDeleted() || item->isAyuNoForwards() || item->unsupportedTTL() || item->media() && item->media()->ttlSeconds()) {
if (item->isDeleted() || item->isAyuNoForwards() || item->unsupportedTTL() || (item->media() && item->media()->ttlSeconds())) {
return true;
}
return false;
+2 -2
View File
@@ -100,8 +100,8 @@ private:
std::unordered_map<ID, CustomBadge> _customBadges = {};
QString _donateUsername = QString("@ayugramOwner");
QString _donateAmountUsd = QString("4.50");
QString _donateAmountTon = QString("3.25");
QString _donateAmountUsd = QString("4.60");
QString _donateAmountTon = QString("3.50");
QString _donateAmountRub = QString("360");
QTimer* _timer = nullptr;
@@ -1077,7 +1077,7 @@ TextWithEntities reverseLocalPremiumEmoji(const TextWithEntities &text, not_null
auto result = text;
for (auto &entity : result.entities) {
if (entity.type() == EntityType::CustomEmoji && entity.isLocal()) {
if (isForQuote || !history->peer->isSelf() && !(history->owner().session().user()->flags() & UserDataFlag::Premium) && !emojiAllowed(entity)) {
if (isForQuote || (!history->peer->isSelf() && !(history->owner().session().user()->flags() & UserDataFlag::Premium) && !emojiAllowed(entity))) {
entity = EntityInText(
EntityType::CustomUrl,
entity.offset(),
+1 -1
View File
@@ -2312,7 +2312,7 @@ bool Stories::isQuitPrevent() {
}
const auto &ghost = AyuSettings::ghost(&_owner->session());
if (!ghost.sendReadStories() || _markReadRequests.empty() && _incrementViewsRequests.empty()) {
if (!ghost.sendReadStories() || (_markReadRequests.empty() && _incrementViewsRequests.empty())) {
return false;
}
LOG(("Stories prevents quit, marking as read..."));
@@ -3390,7 +3390,7 @@ void ComposeControls::updateControlsGeometry(QSize size) {
- (commentsShown
? (_commentsShown->width() + _st.commentsSkip)
: 0)
- ((_attachToggle && settings.showAttachButtonInMessageField() || _sendAs) ? _st.padding.left() : _st.fieldLeft)
- (((_attachToggle && settings.showAttachButtonInMessageField()) || _sendAs) ? _st.padding.left() : _st.fieldLeft)
- (_attachToggle && settings.showAttachButtonInMessageField() ? _attachToggle->width() : 0)
- (_sendAs ? _sendAs->width() : 0)
- _st.padding.right()
@@ -409,16 +409,13 @@ void GroupedMedia::draw(Painter &p, const PaintContext &context) const {
auto fullRect = QRect();
const auto subpartHighlight = IsSubGroupSelection(highlight);
auto allDeleted = true;
auto anyDeleted = false;
const auto &ayuSettings = AyuSettings::getInstance();
const auto perItemOpacityEnabled = ayuSettings.semiTransparentDeletedMessages();
const auto &settings = AyuSettings::getInstance();
const auto perItemOpacityEnabled = settings.semiTransparentDeletedMessages();
if (perItemOpacityEnabled) {
for (const auto &part : _parts) {
if (part.item->isDeleted()) {
anyDeleted = true;
} else {
allDeleted = false;
}
}
}