mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-08-04 19:03:42 +00:00
chore: fix some warnings
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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(),
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user