Compare commits
19 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e117d08b2c | ||
|
|
58783170cd | ||
|
|
9ba2426c02 | ||
|
|
2cbaa7b03d | ||
|
|
836a0f3a73 | ||
|
|
e9977f551f | ||
|
|
78abe362cd | ||
|
|
47c2922d55 | ||
|
|
690f3fecbb | ||
|
|
d9242db7b3 | ||
|
|
a9b5e22b37 | ||
|
|
7b8f1704dc | ||
|
|
de88ddf42b | ||
|
|
b1e707c346 | ||
|
|
36b7b3a7cd | ||
|
|
d44349d612 | ||
|
|
53919be913 | ||
|
|
8dd7d04fff | ||
|
|
384f6d9a31 |
@@ -1058,8 +1058,6 @@ PRIVATE
|
||||
info/profile/info_profile_members_controllers.h
|
||||
info/profile/info_profile_phone_menu.cpp
|
||||
info/profile/info_profile_phone_menu.h
|
||||
info/profile/info_profile_text.cpp
|
||||
info/profile/info_profile_text.h
|
||||
info/profile/info_profile_values.cpp
|
||||
info/profile/info_profile_values.h
|
||||
info/profile/info_profile_widget.cpp
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<Identity Name="TelegramMessengerLLP.TelegramDesktop"
|
||||
ProcessorArchitecture="ARCHITECTURE"
|
||||
Publisher="CN=536BC709-8EE1-4478-AF22-F0F0F26FF64A"
|
||||
Version="6.2.0.0" />
|
||||
Version="6.2.3.0" />
|
||||
<Properties>
|
||||
<DisplayName>Telegram Desktop</DisplayName>
|
||||
<PublisherDisplayName>Telegram Messenger LLP</PublisherDisplayName>
|
||||
|
||||
@@ -44,8 +44,8 @@ IDI_ICON1 ICON "..\\art\\icon256.ico"
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 6,2,0,0
|
||||
PRODUCTVERSION 6,2,0,0
|
||||
FILEVERSION 6,2,3,0
|
||||
PRODUCTVERSION 6,2,3,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
@@ -62,10 +62,10 @@ BEGIN
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Telegram FZ-LLC"
|
||||
VALUE "FileDescription", "Telegram Desktop"
|
||||
VALUE "FileVersion", "6.2.0.0"
|
||||
VALUE "FileVersion", "6.2.3.0"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2014-2025"
|
||||
VALUE "ProductName", "Telegram Desktop"
|
||||
VALUE "ProductVersion", "6.2.0.0"
|
||||
VALUE "ProductVersion", "6.2.3.0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
||||
@@ -35,8 +35,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 6,2,0,0
|
||||
PRODUCTVERSION 6,2,0,0
|
||||
FILEVERSION 6,2,3,0
|
||||
PRODUCTVERSION 6,2,3,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
@@ -53,10 +53,10 @@ BEGIN
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Telegram FZ-LLC"
|
||||
VALUE "FileDescription", "Telegram Desktop Updater"
|
||||
VALUE "FileVersion", "6.2.0.0"
|
||||
VALUE "FileVersion", "6.2.3.0"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2014-2025"
|
||||
VALUE "ProductName", "Telegram Desktop"
|
||||
VALUE "ProductVersion", "6.2.0.0"
|
||||
VALUE "ProductVersion", "6.2.3.0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
||||
@@ -1627,6 +1627,17 @@ void Updates::feedUpdate(const MTPUpdate &update) {
|
||||
auto &d = update.c_updateNewChannelMessage();
|
||||
auto channel = session().data().channelLoaded(peerToChannel(PeerFromMessage(d.vmessage())));
|
||||
const auto isDataLoaded = AllDataLoadedForMessage(&session(), d.vmessage());
|
||||
{
|
||||
// Todo delete.
|
||||
const auto messageId = IdFromMessage(d.vmessage());
|
||||
if (const auto history = channel ? session().data().historyLoaded(channel) : nullptr) {
|
||||
if (history->isUnknownMessageDeleted(messageId)) {
|
||||
LOG(("Unknown message deleted detected for channel %1, message %2")
|
||||
.arg(channel->id.value & PeerId::kChatTypeMask)
|
||||
.arg(messageId.bare));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!requestingDifference() && (!channel || isDataLoaded != DataIsLoadedResult::Ok)) {
|
||||
MTP_LOG(0, ("getDifference "
|
||||
"{ good - after not all data loaded in updateNewChannelMessage }%1"
|
||||
|
||||
@@ -449,25 +449,25 @@ void Controller::setupNotesField() {
|
||||
};
|
||||
const auto limitState = _notesField->lifetime().make_state<LimitState>();
|
||||
|
||||
const auto checkCharsLimitation = [=] {
|
||||
const auto checkCharsLimitation = [=, w = _notesField->window()] {
|
||||
const auto limit = Data::PremiumLimits(
|
||||
&_user->session()).contactNoteLengthCurrent();
|
||||
const auto remove = Ui::ComputeFieldCharacterCount(_notesField)
|
||||
- limit;
|
||||
if (!limitState->charsLimitation) {
|
||||
const auto border = _notesField->st().borderActive;
|
||||
limitState->charsLimitation = base::make_unique_q<Limit>(
|
||||
_box->verticalLayout(),
|
||||
emojiButton,
|
||||
style::al_top,
|
||||
QMargins{ 0, -st::lineWidth, 0, 0 });
|
||||
_notesField->heightValue(
|
||||
) | rpl::start_with_next([=](int height) {
|
||||
const auto &st = _notesField->st();
|
||||
const auto hasMultipleLines = height >
|
||||
(st.textMargins.top()
|
||||
+ st.style.font->height
|
||||
+ st.textMargins.bottom() * 2);
|
||||
limitState->charsLimitation->setVisible(hasMultipleLines);
|
||||
QMargins{ 0, -border - _notesField->st().border, 0, 0 });
|
||||
rpl::combine(
|
||||
limitState->charsLimitation->geometryValue(),
|
||||
_notesField->geometryValue()
|
||||
) | rpl::start_with_next([=](QRect limit, QRect field) {
|
||||
limitState->charsLimitation->setVisible(
|
||||
(w->mapToGlobal(limit.bottomLeft()).y() - border)
|
||||
< w->mapToGlobal(field.bottomLeft()).y());
|
||||
limitState->charsLimitation->raise();
|
||||
}, limitState->charsLimitation->lifetime());
|
||||
}
|
||||
@@ -484,7 +484,10 @@ void Controller::setupNotesField() {
|
||||
}
|
||||
|
||||
void Controller::setupPhotoButtons() {
|
||||
const auto iconSize = st::restoreUserpicIcon.size;
|
||||
if (!_user->isContact()) {
|
||||
return;
|
||||
}
|
||||
const auto iconPlaceholder = st::restoreUserpicIcon.size * 2;
|
||||
auto nameValue = _firstNameField
|
||||
? rpl::merge(
|
||||
rpl::single(_firstNameField->getLastText().trimmed()),
|
||||
@@ -515,7 +518,8 @@ void Controller::setupPhotoButtons() {
|
||||
.sessionWindow = base::make_weak(_window),
|
||||
}));
|
||||
});
|
||||
suggestBirthdayWrap->toggleOn(rpl::single(!_user->birthday().valid()));
|
||||
suggestBirthdayWrap->toggleOn(rpl::single(!_user->birthday().valid()
|
||||
&& !_user->starsPerMessageChecked()));
|
||||
|
||||
_suggestIcon = Ui::MakeAnimatedIcon({
|
||||
.generator = [] {
|
||||
@@ -524,7 +528,7 @@ void Controller::setupPhotoButtons() {
|
||||
QByteArray(),
|
||||
u":/animations/photo_suggest_icon.tgs"_q));
|
||||
},
|
||||
.sizeOverride = iconSize * style::DevicePixelRatio(),
|
||||
.sizeOverride = iconPlaceholder,
|
||||
.colorized = true,
|
||||
});
|
||||
|
||||
@@ -535,30 +539,36 @@ void Controller::setupPhotoButtons() {
|
||||
QByteArray(),
|
||||
u":/animations/camera_outline.tgs"_q));
|
||||
},
|
||||
.sizeOverride = iconSize * style::DevicePixelRatio(),
|
||||
.sizeOverride = iconPlaceholder,
|
||||
.colorized = true,
|
||||
});
|
||||
|
||||
const auto suggestButtonWrap = inner->add(
|
||||
object_ptr<Ui::SlideWrap<Ui::VerticalLayout>>(
|
||||
inner,
|
||||
object_ptr<Ui::VerticalLayout>(inner)));
|
||||
suggestButtonWrap->toggleOn(
|
||||
rpl::single(!_user->starsPerMessageChecked()));
|
||||
|
||||
const auto suggestButton = Settings::AddButtonWithIcon(
|
||||
inner,
|
||||
suggestButtonWrap->entity(),
|
||||
tr::lng_suggest_photo_for(lt_user, rpl::duplicate(nameValue)),
|
||||
st::settingsButtonLight,
|
||||
{ nullptr });
|
||||
|
||||
_suggestIconWidget = Ui::CreateChild<Ui::RpWidget>(suggestButton);
|
||||
_suggestIconWidget->resize(iconSize * style::DevicePixelRatio());
|
||||
_suggestIconWidget->resize(iconPlaceholder);
|
||||
_suggestIconWidget->paintRequest() | rpl::start_with_next([=] {
|
||||
if (_suggestIcon && _suggestIcon->valid()) {
|
||||
auto p = QPainter(_suggestIconWidget);
|
||||
const auto frame = _suggestIcon->frame(st::lightButtonFg->c);
|
||||
const auto rect = _suggestIconWidget->rect();
|
||||
p.drawImage(rect, frame);
|
||||
p.drawImage(_suggestIconWidget->rect(), frame);
|
||||
}
|
||||
}, _suggestIconWidget->lifetime());
|
||||
|
||||
suggestButton->sizeValue() | rpl::start_with_next([=](QSize size) {
|
||||
_suggestIconWidget->move(
|
||||
st::settingsButtonLight.iconLeft - iconSize.width() / 2,
|
||||
st::settingsButtonLight.iconLeft - iconPlaceholder.width() / 4,
|
||||
(size.height() - _suggestIconWidget->height()) / 2);
|
||||
}, _suggestIconWidget->lifetime());
|
||||
|
||||
@@ -579,19 +589,18 @@ void Controller::setupPhotoButtons() {
|
||||
{ nullptr });
|
||||
|
||||
_cameraIconWidget = Ui::CreateChild<Ui::RpWidget>(setButton);
|
||||
_cameraIconWidget->resize(iconSize * style::DevicePixelRatio());
|
||||
_cameraIconWidget->resize(iconPlaceholder);
|
||||
_cameraIconWidget->paintRequest() | rpl::start_with_next([=] {
|
||||
if (_cameraIcon && _cameraIcon->valid()) {
|
||||
auto p = QPainter(_cameraIconWidget);
|
||||
const auto frame = _cameraIcon->frame(st::lightButtonFg->c);
|
||||
const auto rect = _cameraIconWidget->rect();
|
||||
p.drawImage(rect, frame);
|
||||
p.drawImage(_cameraIconWidget->rect(), frame);
|
||||
}
|
||||
}, _cameraIconWidget->lifetime());
|
||||
|
||||
setButton->sizeValue() | rpl::start_with_next([=](QSize size) {
|
||||
_cameraIconWidget->move(
|
||||
st::settingsButtonLight.iconLeft - iconSize.width() / 2,
|
||||
st::settingsButtonLight.iconLeft - iconPlaceholder.width() / 4,
|
||||
(size.height() - _cameraIconWidget->height()) / 2);
|
||||
}, _cameraIconWidget->lifetime());
|
||||
|
||||
@@ -634,7 +643,7 @@ void Controller::setupPhotoButtons() {
|
||||
resetButtonWrap->toggleOn(
|
||||
_user->session().changes().peerFlagsValue(
|
||||
_user,
|
||||
Data::PeerUpdate::Flag::FullInfo
|
||||
Data::PeerUpdate::Flag::FullInfo | Data::PeerUpdate::Flag::Photo
|
||||
) | rpl::map([=] {
|
||||
return _user->hasPersonalPhoto();
|
||||
}) | rpl::distinct_until_changed());
|
||||
@@ -645,8 +654,9 @@ void Controller::setupPhotoButtons() {
|
||||
tr::now,
|
||||
lt_user,
|
||||
_user->shortName()),
|
||||
.confirmed = [=] {
|
||||
.confirmed = [=](Fn<void()> close) {
|
||||
_window->session().api().peerPhoto().clearPersonal(_user);
|
||||
close();
|
||||
},
|
||||
.confirmText = tr::lng_profile_photo_reset(tr::now),
|
||||
}));
|
||||
@@ -810,11 +820,6 @@ void Controller::processChosenPhoto(QImage &&image, bool suggest) {
|
||||
Api::PeerPhoto::UserPhoto photo{
|
||||
.image = base::duplicate(image),
|
||||
};
|
||||
if (suggest && _suggestIcon && _suggestIcon->valid()) {
|
||||
_suggestIcon->animate([=] { _suggestIconWidget->update(); });
|
||||
} else if (!suggest && _cameraIcon && _cameraIcon->valid()) {
|
||||
_cameraIcon->animate([=] { _cameraIconWidget->update(); });
|
||||
}
|
||||
if (suggest) {
|
||||
_window->session().api().peerPhoto().suggest(_user, std::move(photo));
|
||||
_window->showPeerHistory(_user->id);
|
||||
@@ -831,11 +836,6 @@ void Controller::processChosenPhotoWithMarkup(
|
||||
.markupDocumentId = data.id,
|
||||
.markupColors = std::move(data.colors),
|
||||
};
|
||||
if (suggest && _suggestIcon && _suggestIcon->valid()) {
|
||||
_suggestIcon->animate([=] { _suggestIconWidget->update(); });
|
||||
} else if (!suggest && _cameraIcon && _cameraIcon->valid()) {
|
||||
_cameraIcon->animate([=] { _cameraIconWidget->update(); });
|
||||
}
|
||||
if (suggest) {
|
||||
_window->session().api().peerPhoto().suggest(_user, std::move(photo));
|
||||
_window->showPeerHistory(_user->id);
|
||||
|
||||
@@ -22,7 +22,7 @@ constexpr auto AppId = "{53F49750-6209-4FBF-9CA8-7A333C87D1ED}"_cs;
|
||||
constexpr auto AppNameOld = "Telegram Win (Unofficial)"_cs;
|
||||
constexpr auto AppName = "Telegram Desktop"_cs;
|
||||
constexpr auto AppFile = "Telegram"_cs;
|
||||
constexpr auto AppVersion = 6002000;
|
||||
constexpr auto AppVersionStr = "6.2";
|
||||
constexpr auto AppVersion = 6002003;
|
||||
constexpr auto AppVersionStr = "6.2.3";
|
||||
constexpr auto AppBetaVersion = false;
|
||||
constexpr auto AppAlphaVersion = TDESKTOP_ALPHA_VERSION;
|
||||
|
||||
@@ -320,11 +320,7 @@ rpl::producer<int> TopBarSuggestionContent::desiredHeightValue() const {
|
||||
const auto desiredHeight = lastTop
|
||||
+ (lastLines * _contentTextSt.font->height)
|
||||
+ bottomPadding;
|
||||
const auto minHeight = desiredHeight;
|
||||
return std::clamp(
|
||||
desiredHeight,
|
||||
minHeight,
|
||||
st::sponsoredMessageBarMaxHeight);
|
||||
return std::min(desiredHeight, st::sponsoredMessageBarMaxHeight);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -2976,11 +2976,19 @@ bool History::shouldBeInChatList() const {
|
||||
}
|
||||
|
||||
void History::unknownMessageDeleted(MsgId messageId) {
|
||||
LOG(("History::unknownMessageDeleted. Peer ID: %1, Message ID: %2.")
|
||||
.arg(peer->id.value & PeerId::kChatTypeMask)
|
||||
.arg(messageId.bare));
|
||||
_unknownDeletedMessages[messageId] = base::unixtime::now();
|
||||
if (_inboxReadBefore && messageId >= *_inboxReadBefore) {
|
||||
owner().histories().requestDialogEntry(this);
|
||||
}
|
||||
}
|
||||
|
||||
bool History::isUnknownMessageDeleted(MsgId messageId) const {
|
||||
return _unknownDeletedMessages.contains(messageId);
|
||||
}
|
||||
|
||||
bool History::isServerSideUnread(not_null<const HistoryItem*> item) const {
|
||||
Expects(item->isRegular());
|
||||
|
||||
|
||||
@@ -249,6 +249,7 @@ public:
|
||||
[[nodiscard]] bool lastMessageKnown() const;
|
||||
[[nodiscard]] bool lastServerMessageKnown() const;
|
||||
void unknownMessageDeleted(MsgId messageId);
|
||||
[[nodiscard]] bool isUnknownMessageDeleted(MsgId messageId) const;
|
||||
void applyDialogTopMessage(MsgId topMessageId);
|
||||
void applyDialog(Data::Folder *requestFolder, const MTPDdialog &data);
|
||||
void applyPinnedUpdate(const MTPDupdateDialogPinned &data);
|
||||
@@ -668,6 +669,8 @@ private:
|
||||
base::flat_map<Data::DraftKey, int> _savingCloudDraftRequests;
|
||||
base::flat_map<Data::DraftKey, Data::ForwardDraft> _forwardDrafts;
|
||||
|
||||
base::flat_map<MsgId, TimeId> _unknownDeletedMessages;
|
||||
|
||||
QString _topPromotedMessage;
|
||||
QString _topPromotedType;
|
||||
|
||||
|
||||
@@ -7148,6 +7148,11 @@ void HistoryWidget::startItemRevealAnimations() {
|
||||
|
||||
void HistoryWidget::startMessageSendingAnimation(
|
||||
not_null<HistoryItem*> item) {
|
||||
if (_list->elementChatMode() == HistoryView::ElementChatMode::Default
|
||||
&& width() > st::columnMaximalWidthLeft
|
||||
&& !item->media()) {
|
||||
return;
|
||||
}
|
||||
auto &sendingAnimation = controller()->sendingAnimation();
|
||||
if (!sendingAnimation.checkExpectedType(item)) {
|
||||
return;
|
||||
|
||||
@@ -76,6 +76,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "data/data_message_reactions.h"
|
||||
#include "data/data_peer_values.h"
|
||||
#include "styles/style_chat.h"
|
||||
#include "styles/style_window.h" // columnMaximalWidthLeft
|
||||
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtCore/QMimeData>
|
||||
@@ -2019,6 +2020,11 @@ void ListWidget::startItemRevealAnimations() {
|
||||
|
||||
void ListWidget::startMessageSendingAnimation(
|
||||
not_null<HistoryItem*> item) {
|
||||
if (elementChatMode() == HistoryView::ElementChatMode::Default
|
||||
&& width() > st::columnMaximalWidthLeft
|
||||
&& !item->media()) {
|
||||
return;
|
||||
}
|
||||
const auto sendingAnimation = _delegate->listSendingAnimation();
|
||||
if (!sendingAnimation || !sendingAnimation->checkExpectedType(item)) {
|
||||
return;
|
||||
|
||||
@@ -903,10 +903,12 @@ void Reply::paint(
|
||||
if (namew > 0) {
|
||||
p.setPen(!inBubble
|
||||
? st->msgImgReplyBarColor()->c
|
||||
: FromNameFg(
|
||||
: (colorCollectible || colorIndexPlusOne)
|
||||
? FromNameFg(
|
||||
context,
|
||||
colorIndexPlusOne - 1,
|
||||
colorCollectible));
|
||||
colorCollectible)
|
||||
: stm->msgServiceFg->c);
|
||||
_name.drawLeftElided(
|
||||
p,
|
||||
x + st::historyReplyPadding.left() + previewSkip,
|
||||
|
||||
@@ -538,27 +538,45 @@ void GiftButton::contextMenuEvent(QContextMenuEvent *e) {
|
||||
}
|
||||
|
||||
void GiftButton::mousePressEvent(QMouseEvent *e) {
|
||||
_mouseEvents.fire_copy(e);
|
||||
if (e->isAccepted()) {
|
||||
return;
|
||||
if (_mouseEventsAreListening) {
|
||||
if (e->button() != Qt::LeftButton) {
|
||||
return;
|
||||
}
|
||||
_mouseEvents.fire_copy(e);
|
||||
} else {
|
||||
AbstractButton::mousePressEvent(e);
|
||||
}
|
||||
AbstractButton::mousePressEvent(e);
|
||||
}
|
||||
|
||||
void GiftButton::mouseMoveEvent(QMouseEvent *e) {
|
||||
_mouseEvents.fire_copy(e);
|
||||
if (e->isAccepted()) {
|
||||
return;
|
||||
if (_mouseEventsAreListening) {
|
||||
if (e->button() != Qt::LeftButton) {
|
||||
return;
|
||||
}
|
||||
_mouseEvents.fire_copy(e);
|
||||
} else {
|
||||
AbstractButton::mouseMoveEvent(e);
|
||||
}
|
||||
AbstractButton::mouseMoveEvent(e);
|
||||
}
|
||||
|
||||
void GiftButton::mouseReleaseEvent(QMouseEvent *e) {
|
||||
_mouseEvents.fire_copy(e);
|
||||
if (e->isAccepted()) {
|
||||
return;
|
||||
if (_mouseEventsAreListening) {
|
||||
if (e->button() != Qt::LeftButton) {
|
||||
return;
|
||||
}
|
||||
_mouseEvents.fire_copy(e);
|
||||
} else {
|
||||
AbstractButton::mouseReleaseEvent(e);
|
||||
}
|
||||
AbstractButton::mouseReleaseEvent(e);
|
||||
}
|
||||
|
||||
rpl::producer<QPoint> GiftButton::contextMenuRequests() const {
|
||||
return _contextMenuRequests.events();
|
||||
}
|
||||
|
||||
rpl::producer<QMouseEvent*> GiftButton::mouseEvents() {
|
||||
_mouseEventsAreListening = true;
|
||||
return _mouseEvents.events();
|
||||
}
|
||||
|
||||
void GiftButton::cacheUniqueBackground(
|
||||
|
||||
@@ -174,13 +174,8 @@ public:
|
||||
GiftSelectionMode selectionMode = GiftSelectionMode::Border,
|
||||
anim::type animated = anim::type::normal);
|
||||
|
||||
[[nodiscard]] rpl::producer<QPoint> contextMenuRequests() const {
|
||||
return _contextMenuRequests.events();
|
||||
}
|
||||
|
||||
[[nodiscard]] rpl::producer<QMouseEvent*> mouseEvents() const {
|
||||
return _mouseEvents.events();
|
||||
}
|
||||
[[nodiscard]] rpl::producer<QPoint> contextMenuRequests() const;
|
||||
[[nodiscard]] rpl::producer<QMouseEvent*> mouseEvents();
|
||||
|
||||
private:
|
||||
void paintEvent(QPaintEvent *e) override;
|
||||
@@ -228,6 +223,8 @@ private:
|
||||
bool _selected : 1 = false;
|
||||
bool _locked : 1 = false;
|
||||
|
||||
bool _mouseEventsAreListening = false;
|
||||
|
||||
base::Timer _lockedTimer;
|
||||
TimeId _lockedUntilDate = 0;
|
||||
|
||||
|
||||
@@ -747,21 +747,12 @@ std::unique_ptr<GiftButton> InnerWidget::createGiftButton() {
|
||||
case QEvent::MouseButtonPress:
|
||||
raw->raise();
|
||||
mousePressEvent(e);
|
||||
if (e->isAccepted()) {
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case QEvent::MouseMove:
|
||||
mouseMoveEvent(e);
|
||||
if (e->isAccepted()) {
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case QEvent::MouseButtonRelease:
|
||||
mouseReleaseEvent(e);
|
||||
if (e->isAccepted()) {
|
||||
return;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -840,9 +831,6 @@ void InnerWidget::validateButtons() {
|
||||
}
|
||||
}
|
||||
auto &view = views.back();
|
||||
const auto callback = _addingToCollectionId
|
||||
? Fn<void()>([=] { showGift(index); })
|
||||
: nullptr;
|
||||
view.index = index;
|
||||
view.manageId = manageId;
|
||||
view.giftId = giftId;
|
||||
@@ -853,9 +841,6 @@ void InnerWidget::validateButtons() {
|
||||
anim::type::instant);
|
||||
}
|
||||
view.button->setDescriptor(descriptor, _mode);
|
||||
if (callback) {
|
||||
view.button->setClickedCallback(callback);
|
||||
}
|
||||
return true;
|
||||
};
|
||||
for (auto j = fromRow; j != tillRow; ++j) {
|
||||
@@ -921,8 +906,6 @@ void InnerWidget::validateButtons() {
|
||||
_inCollection.contains(entry.gift.manageId),
|
||||
GiftSelectionMode::Check,
|
||||
anim::type::instant);
|
||||
const auto callback = [=] { showGift(_dragging.index); };
|
||||
_draggedView->button->setClickedCallback(callback);
|
||||
}
|
||||
_draggedView->button->show();
|
||||
} else {
|
||||
|
||||
@@ -22,6 +22,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "ui/painter.h"
|
||||
#include "ui/rect.h"
|
||||
#include "ui/rp_widget.h"
|
||||
#include "ui/power_saving.h"
|
||||
#include "ui/text/text_isolated_emoji.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "styles/style_chat.h"
|
||||
@@ -144,7 +145,8 @@ Content::Content(
|
||||
const auto resultTo = _isText
|
||||
? _to + innerGeometry.topLeft()
|
||||
: _to + innerGeometry.topLeft() + _innerContentRect.topLeft();
|
||||
const auto x = anim::interpolate(resultFrom.x(), resultTo.x(), value);
|
||||
const auto xEase = anim::easeOutQuint(1.0, value);
|
||||
const auto x = anim::interpolate(resultFrom.x(), resultTo.x(), xEase);
|
||||
const auto y = anim::interpolate(resultFrom.y(), resultTo.y(), value);
|
||||
if (!_isText) {
|
||||
// Text-only messages are drawing only in _bubble.widget.
|
||||
@@ -358,6 +360,7 @@ void Content::createBubble() {
|
||||
(currentView->hasOutLayout() ? tailWidth : 0)
|
||||
+ (_isText && currentView->data()->isPost()
|
||||
? rect::m::sum::h(st::msgPadding)
|
||||
+ st::historyFastShareSize
|
||||
: 0),
|
||||
(hasCommentsButton || _isText) ? innerGeometry.y() : 0));
|
||||
_bubble.widget->show();
|
||||
@@ -365,8 +368,8 @@ void Content::createBubble() {
|
||||
_bubble.widget->stackUnder(this);
|
||||
|
||||
_bubble.widget->paintRequest(
|
||||
) | rpl::start_with_next([=](const QRect &r) {
|
||||
Painter p(_bubble.widget);
|
||||
) | rpl::start_with_next([=, raw = _bubble.widget.get()](const QRect &r) {
|
||||
auto p = Painter(raw);
|
||||
|
||||
p.fillRect(r, Qt::transparent);
|
||||
|
||||
@@ -393,7 +396,15 @@ void Content::createBubble() {
|
||||
context.skipDrawingParts = Context::SkipDrawingParts::Content;
|
||||
context.outbg = currentView->hasOutLayout();
|
||||
|
||||
context.translate(paintOffsetLeft, -context.viewport.y());
|
||||
const auto diff = context.viewport.height() - raw->height();
|
||||
auto bottom = anim::interpolate(_from.y(), _to.y(), progress);
|
||||
if (bottom > diff) {
|
||||
bottom = diff;
|
||||
}
|
||||
if (bottom < raw->height()) {
|
||||
bottom = raw->height();
|
||||
}
|
||||
context.translate(paintOffsetLeft, -context.viewport.y() - bottom);
|
||||
p.translate(-paintOffsetLeft, 0);
|
||||
|
||||
currentView->draw(p, context);
|
||||
@@ -438,7 +449,8 @@ void MessageSendingAnimationController::appendSending(
|
||||
}
|
||||
|
||||
void MessageSendingAnimationController::startAnimation(SendingInfoTo &&to) {
|
||||
if (anim::Disabled()) {
|
||||
if (anim::Disabled()
|
||||
|| PowerSaving::On(PowerSaving::Flag::kChatEffects)) {
|
||||
return;
|
||||
}
|
||||
const auto container = _controller->content();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
AppVersion 6002000
|
||||
AppVersion 6002003
|
||||
AppVersionStrMajor 6.2
|
||||
AppVersionStrSmall 6.2
|
||||
AppVersionStr 6.2.0
|
||||
AppVersionStrSmall 6.2.3
|
||||
AppVersionStr 6.2.3
|
||||
BetaChannel 0
|
||||
AlphaVersion 0
|
||||
AppVersionOriginal 6.2
|
||||
AppVersionOriginal 6.2.3
|
||||
|
||||
@@ -148,6 +148,8 @@ PRIVATE
|
||||
info/profile/info_profile_icon.h
|
||||
info/profile/info_profile_music_button.cpp
|
||||
info/profile/info_profile_music_button.h
|
||||
info/profile/info_profile_text.cpp
|
||||
info/profile/info_profile_text.h
|
||||
info/userpic/info_userpic_bubble_wrap.cpp
|
||||
info/userpic/info_userpic_bubble_wrap.h
|
||||
info/userpic/info_userpic_color_circle_button.cpp
|
||||
|
||||
Submodule Telegram/lib_ui updated: ba1417299f...3e254ffe1b
@@ -1,3 +1,21 @@
|
||||
6.2.3 (12.10.25)
|
||||
|
||||
- Fix crash when viewing messages with hidden senders.
|
||||
- Fix possible crash when editing contacts.
|
||||
- Fix layout of character count warning in contact notes.
|
||||
- Fix icons when editing contacts.
|
||||
- Fix color of sending messages animation in complex themes.
|
||||
- Fix crash in chat open on Flatpak build.
|
||||
|
||||
6.2.2 (10.10.25)
|
||||
|
||||
- Fix layer.
|
||||
|
||||
6.2.1 (10.10.25)
|
||||
|
||||
- Fix sending gifts.
|
||||
- Fix possible crash on Linux.
|
||||
|
||||
6.2 (10.10.25)
|
||||
|
||||
- Comments and reactions in group calls.
|
||||
|
||||
Reference in New Issue
Block a user