Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2f48bbd317 | ||
|
|
450f9ca91e | ||
|
|
f86e2d98cc | ||
|
|
0cf85be86b | ||
|
|
a15ef8bbc2 | ||
|
|
ecca60afe4 | ||
|
|
1ab0f840f3 | ||
|
|
3623fb1f9a | ||
|
|
4cbfcc8dbc | ||
|
|
90821428d3 | ||
|
|
c5468a1111 | ||
|
|
505ef04134 | ||
|
|
f70c2adbdd |
BIN
Telegram/Resources/icons/info/edit/group_manage_reactions.png
Normal file
BIN
Telegram/Resources/icons/info/edit/group_manage_reactions.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1016 B |
BIN
Telegram/Resources/icons/info/edit/group_manage_reactions@2x.png
Normal file
BIN
Telegram/Resources/icons/info/edit/group_manage_reactions@2x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.0 KiB |
BIN
Telegram/Resources/icons/info/edit/group_manage_reactions@3x.png
Normal file
BIN
Telegram/Resources/icons/info/edit/group_manage_reactions@3x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.9 KiB |
@@ -10,7 +10,7 @@
|
||||
<Identity Name="TelegramMessengerLLP.TelegramDesktop"
|
||||
ProcessorArchitecture="ARCHITECTURE"
|
||||
Publisher="CN=536BC709-8EE1-4478-AF22-F0F0F26FF64A"
|
||||
Version="3.3.2.0" />
|
||||
Version="3.4.0.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 3,3,2,0
|
||||
PRODUCTVERSION 3,3,2,0
|
||||
FILEVERSION 3,4,0,0
|
||||
PRODUCTVERSION 3,4,0,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
@@ -62,10 +62,10 @@ BEGIN
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Telegram FZ-LLC"
|
||||
VALUE "FileDescription", "Telegram Desktop"
|
||||
VALUE "FileVersion", "3.3.2.0"
|
||||
VALUE "FileVersion", "3.4.0.0"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2014-2021"
|
||||
VALUE "ProductName", "Telegram Desktop"
|
||||
VALUE "ProductVersion", "3.3.2.0"
|
||||
VALUE "ProductVersion", "3.4.0.0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
||||
@@ -35,8 +35,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 3,3,2,0
|
||||
PRODUCTVERSION 3,3,2,0
|
||||
FILEVERSION 3,4,0,0
|
||||
PRODUCTVERSION 3,4,0,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", "3.3.2.0"
|
||||
VALUE "FileVersion", "3.4.0.0"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2014-2021"
|
||||
VALUE "ProductName", "Telegram Desktop"
|
||||
VALUE "ProductVersion", "3.3.2.0"
|
||||
VALUE "ProductVersion", "3.4.0.0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
||||
@@ -493,7 +493,9 @@ rpl::producer<Ui::WhoReadContent> WhoReacted(
|
||||
[](const auto &pair) { return pair.second; });
|
||||
|
||||
// #TODO reactions
|
||||
state->current.mostPopularReaction = item->reactions().front().first;
|
||||
state->current.singleReaction = (list.size() == 1)
|
||||
? list.front().first
|
||||
: QString();
|
||||
}
|
||||
std::move(
|
||||
idsWithReactions
|
||||
|
||||
@@ -522,7 +522,7 @@ void ProxyRow::showMenu() {
|
||||
const QString &text,
|
||||
Fn<void()> callback,
|
||||
const style::icon *icon) {
|
||||
return _menu->addAction(text, std::move(callback));
|
||||
return _menu->addAction(text, std::move(callback), icon);
|
||||
};
|
||||
addAction(tr::lng_proxy_menu_edit(tr::now), [=] {
|
||||
_editClicks.fire({});
|
||||
|
||||
@@ -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 = 3003002;
|
||||
constexpr auto AppVersionStr = "3.3.2";
|
||||
constexpr auto AppBetaVersion = true;
|
||||
constexpr auto AppVersion = 3004000;
|
||||
constexpr auto AppVersionStr = "3.4";
|
||||
constexpr auto AppBetaVersion = false;
|
||||
constexpr auto AppAlphaVersion = TDESKTOP_ALPHA_VERSION;
|
||||
|
||||
@@ -767,7 +767,14 @@ bool HistoryItem::suggestDeleteAllReport() const {
|
||||
}
|
||||
|
||||
bool HistoryItem::canReact() const {
|
||||
return isRegular() && !isService();
|
||||
if (!isRegular() || isService()) {
|
||||
return false;
|
||||
} else if (const auto media = this->media()) {
|
||||
if (media->call()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void HistoryItem::addReaction(const QString &reaction) {
|
||||
|
||||
@@ -1868,8 +1868,7 @@ Reactions::ButtonParameters Message::reactionButtonParameters(
|
||||
: (QPoint(contentRect.width(), innerHeight)
|
||||
+ st::reactionCornerCenter));
|
||||
if (reactionState.itemId != result.context) {
|
||||
const auto top = marginTop();
|
||||
if (!QRect(0, top, width(), height() - top).contains(position)) {
|
||||
if (!contentRect.contains(position)) {
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -285,6 +285,7 @@ Manager::Manager(
|
||||
_shadowBuffer = QImage(
|
||||
_outer * ratio,
|
||||
QImage::Format_ARGB32_Premultiplied);
|
||||
_shadowBuffer.setDevicePixelRatio(ratio);
|
||||
|
||||
if (wheelEventsTarget) {
|
||||
stealWheelEvents(wheelEventsTarget);
|
||||
@@ -592,10 +593,8 @@ void Manager::paintButton(
|
||||
paintAllEmoji(p, button, scale, mainEmojiPosition);
|
||||
p.restore();
|
||||
} else {
|
||||
p.drawImage(
|
||||
mainEmojiPosition,
|
||||
_cacheParts,
|
||||
validateEmoji(frameIndex, scale));
|
||||
const auto source = validateEmoji(frameIndex, scale);
|
||||
p.drawImage(mainEmojiPosition, _cacheParts, source);
|
||||
}
|
||||
|
||||
if (opacity != 1.) {
|
||||
|
||||
@@ -9,6 +9,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
|
||||
#include "history/view/reactions/message_reactions_selector.h"
|
||||
#include "boxes/peer_list_box.h"
|
||||
#include "boxes/peers/prepare_short_info_box.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "history/history_item.h"
|
||||
#include "history/history.h"
|
||||
@@ -23,6 +24,26 @@ namespace {
|
||||
constexpr auto kPerPageFirst = 20;
|
||||
constexpr auto kPerPage = 200;
|
||||
|
||||
class Row final : public PeerListRow {
|
||||
public:
|
||||
Row(not_null<PeerData*> peer, const QString &reaction);
|
||||
|
||||
QSize rightActionSize() const override;
|
||||
QMargins rightActionMargins() const override;
|
||||
bool rightActionDisabled() const override;
|
||||
void rightActionPaint(
|
||||
Painter &p,
|
||||
int x,
|
||||
int y,
|
||||
int outerWidth,
|
||||
bool selected,
|
||||
bool actionSelected) override;
|
||||
|
||||
private:
|
||||
EmojiPtr _emoji = nullptr;
|
||||
|
||||
};
|
||||
|
||||
class Controller final : public PeerListController {
|
||||
public:
|
||||
Controller(
|
||||
@@ -62,6 +83,46 @@ private:
|
||||
|
||||
};
|
||||
|
||||
Row::Row(not_null<PeerData*> peer, const QString &reaction)
|
||||
: PeerListRow(peer)
|
||||
, _emoji(Ui::Emoji::Find(reaction)) {
|
||||
}
|
||||
|
||||
QSize Row::rightActionSize() const {
|
||||
const auto size = Ui::Emoji::GetSizeNormal() / style::DevicePixelRatio();
|
||||
return _emoji ? QSize(size, size) : QSize();
|
||||
}
|
||||
|
||||
QMargins Row::rightActionMargins() const {
|
||||
if (!_emoji) {
|
||||
return QMargins();
|
||||
}
|
||||
const auto size = Ui::Emoji::GetSizeNormal() / style::DevicePixelRatio();
|
||||
return QMargins(
|
||||
size / 2,
|
||||
(st::defaultPeerList.item.height - size) / 2,
|
||||
(size * 3) / 2,
|
||||
0);
|
||||
}
|
||||
|
||||
bool Row::rightActionDisabled() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
void Row::rightActionPaint(
|
||||
Painter &p,
|
||||
int x,
|
||||
int y,
|
||||
int outerWidth,
|
||||
bool selected,
|
||||
bool actionSelected) {
|
||||
if (!_emoji) {
|
||||
return;
|
||||
}
|
||||
// #TODO reactions
|
||||
Ui::Emoji::Draw(p, _emoji, Ui::Emoji::GetSizeNormal(), x, y);
|
||||
}
|
||||
|
||||
Controller::Controller(
|
||||
not_null<Window::SessionController*> window,
|
||||
not_null<HistoryItem*> item,
|
||||
@@ -177,9 +238,10 @@ void Controller::loadMore(const QString &offset) {
|
||||
}
|
||||
|
||||
void Controller::rowClicked(not_null<PeerListRow*> row) {
|
||||
const auto peerId = row->peer()->id;
|
||||
crl::on_main(&session(), [=] {
|
||||
_window->showPeerHistory(peerId);
|
||||
const auto window = _window;
|
||||
const auto peer = row->peer();
|
||||
crl::on_main(window, [=] {
|
||||
window->show(PrepareShortInfoBox(peer, window));
|
||||
});
|
||||
}
|
||||
|
||||
@@ -191,66 +253,6 @@ bool Controller::appendRow(not_null<UserData*> user, QString reaction) {
|
||||
return true;
|
||||
}
|
||||
|
||||
class Row final : public PeerListRow {
|
||||
public:
|
||||
Row(not_null<PeerData*> peer, const QString &reaction);
|
||||
|
||||
QSize rightActionSize() const override;
|
||||
QMargins rightActionMargins() const override;
|
||||
bool rightActionDisabled() const override;
|
||||
void rightActionPaint(
|
||||
Painter &p,
|
||||
int x,
|
||||
int y,
|
||||
int outerWidth,
|
||||
bool selected,
|
||||
bool actionSelected) override;
|
||||
|
||||
private:
|
||||
EmojiPtr _emoji = nullptr;
|
||||
|
||||
};
|
||||
|
||||
Row::Row(not_null<PeerData*> peer, const QString &reaction)
|
||||
: PeerListRow(peer)
|
||||
, _emoji(Ui::Emoji::Find(reaction)) {
|
||||
}
|
||||
|
||||
QSize Row::rightActionSize() const {
|
||||
const auto size = Ui::Emoji::GetSizeNormal() / style::DevicePixelRatio();
|
||||
return _emoji ? QSize(size, size) : QSize();
|
||||
}
|
||||
|
||||
QMargins Row::rightActionMargins() const {
|
||||
if (!_emoji) {
|
||||
return QMargins();
|
||||
}
|
||||
const auto size = Ui::Emoji::GetSizeNormal() / style::DevicePixelRatio();
|
||||
return QMargins(
|
||||
size / 2,
|
||||
(st::defaultPeerList.item.height - size) / 2,
|
||||
(size * 3) / 2,
|
||||
0);
|
||||
}
|
||||
|
||||
bool Row::rightActionDisabled() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
void Row::rightActionPaint(
|
||||
Painter &p,
|
||||
int x,
|
||||
int y,
|
||||
int outerWidth,
|
||||
bool selected,
|
||||
bool actionSelected) {
|
||||
if (!_emoji) {
|
||||
return;
|
||||
}
|
||||
// #TODO reactions
|
||||
Ui::Emoji::Draw(p, _emoji, Ui::Emoji::GetSizeNormal(), x, y);
|
||||
}
|
||||
|
||||
std::unique_ptr<PeerListRow> Controller::createRow(
|
||||
not_null<UserData*> user,
|
||||
QString reaction) const {
|
||||
|
||||
@@ -362,7 +362,7 @@ infoIconAdministrators: icon {{ "info/edit/group_manage_admins", infoIconFg, poi
|
||||
infoIconBlacklist: icon {{ "info_blacklist", infoIconFg, point(-2px, -2px) }};
|
||||
infoIconPermissions: icon {{ "info/edit/group_manage_permissions", infoIconFg, point(0px, -2px) }};
|
||||
infoIconInviteLinks: icon {{ "info/edit/group_manage_links", infoIconFg, point(-2px, 0px) }};
|
||||
infoIconReactions: icon {{ "menu/read_reactions", infoIconFg, point(2px, 4px) }};
|
||||
infoIconReactions: icon {{ "info/edit/group_manage_reactions", infoIconFg, point(2px, 4px) }};
|
||||
infoInformationIconPosition: point(25px, 12px);
|
||||
infoNotificationsIconPosition: point(20px, 5px);
|
||||
infoSharedMediaIconPosition: point(20px, 24px);
|
||||
|
||||
@@ -1643,7 +1643,7 @@ void ListWidget::showContextMenu(
|
||||
document,
|
||||
DocumentSaveClickHandler::Mode::ToNewFile);
|
||||
});
|
||||
if (_peer->allowsForwarding()) {
|
||||
if (_peer->allowsForwarding() && !item->forbidsForward()) {
|
||||
_contextMenu->addAction(
|
||||
(isVideo
|
||||
? tr::lng_context_save_video(tr::now)
|
||||
|
||||
@@ -1515,6 +1515,9 @@ void OverlayWidget::notifyFileDialogShown(bool shown) {
|
||||
}
|
||||
|
||||
void OverlayWidget::saveAs() {
|
||||
if (showCopyRestriction()) {
|
||||
return;
|
||||
}
|
||||
QString file;
|
||||
if (_document) {
|
||||
const auto &location = _document->location(true);
|
||||
|
||||
@@ -920,6 +920,9 @@ whoReadChecksDisabled: icon{{ "menu/read_ticks", menuFgDisabled }};
|
||||
whoReadPlayed: icon{{ "menu/read_audio", menuSubmenuArrowFg }};
|
||||
whoReadPlayedOver: icon{{ "menu/read_audio", menuSubmenuArrowFg }};
|
||||
whoReadPlayedDisabled: icon {{ "menu/read_audio", menuFgDisabled }};
|
||||
whoReadReactions: icon{{ "menu/read_reactions", menuSubmenuArrowFg }};
|
||||
whoReadReactionsOver: icon{{ "menu/read_reactions", menuSubmenuArrowFg }};
|
||||
whoReadReactionsDisabled: icon{{ "menu/read_reactions", menuFgDisabled }};
|
||||
|
||||
reactionsTabAll: icon {{ "menu/read_reactions", windowFg }};
|
||||
reactionsTabAllSelected: icon {{ "menu/read_reactions", activeButtonFg }};
|
||||
|
||||
@@ -400,7 +400,7 @@ void Action::paint(Painter &p) {
|
||||
if (enabled) {
|
||||
paintRipple(p, 0, 0);
|
||||
}
|
||||
if (const auto emoji = Emoji::Find(_content.mostPopularReaction)) {
|
||||
if (const auto emoji = Emoji::Find(_content.singleReaction)) {
|
||||
// #TODO reactions
|
||||
const auto ratio = style::DevicePixelRatio();
|
||||
const auto size = Emoji::GetSizeNormal();
|
||||
@@ -409,7 +409,13 @@ void Action::paint(Painter &p) {
|
||||
const auto y = (_height - (size / ratio)) / 2;
|
||||
Emoji::Draw(p, emoji, size, x, y);
|
||||
} else {
|
||||
const auto &icon = (_content.type == WhoReadType::Seen)
|
||||
const auto &icon = (_content.fullReactionsCount)
|
||||
? (!enabled
|
||||
? st::whoReadReactionsDisabled
|
||||
: selected
|
||||
? st::whoReadReactionsOver
|
||||
: st::whoReadReactions)
|
||||
: (_content.type == WhoReadType::Seen)
|
||||
? (!enabled
|
||||
? st::whoReadChecksDisabled
|
||||
: selected
|
||||
|
||||
@@ -40,7 +40,7 @@ enum class WhoReadType {
|
||||
struct WhoReadContent {
|
||||
std::vector<WhoReadParticipant> participants;
|
||||
WhoReadType type = WhoReadType::Seen;
|
||||
QString mostPopularReaction;
|
||||
QString singleReaction;
|
||||
int fullReactionsCount = 0;
|
||||
bool unknown = false;
|
||||
};
|
||||
|
||||
2
Telegram/ThirdParty/nimf
vendored
2
Telegram/ThirdParty/nimf
vendored
Submodule Telegram/ThirdParty/nimf updated: 797cbc201d...181f9467fc
@@ -1,7 +1,7 @@
|
||||
AppVersion 3003002
|
||||
AppVersionStrMajor 3.3
|
||||
AppVersionStrSmall 3.3.2
|
||||
AppVersionStr 3.3.2
|
||||
BetaChannel 1
|
||||
AppVersion 3004000
|
||||
AppVersionStrMajor 3.4
|
||||
AppVersionStrSmall 3.4
|
||||
AppVersionStr 3.4.0
|
||||
BetaChannel 0
|
||||
AlphaVersion 0
|
||||
AppVersionOriginal 3.3.2.beta
|
||||
AppVersionOriginal 3.4
|
||||
|
||||
Submodule Telegram/lib_ui updated: a3b3745d7c...9da4e1e731
@@ -1,3 +1,11 @@
|
||||
3.4 (30.12.21)
|
||||
|
||||
- Send reactions to messages.
|
||||
- Group and Channel admins can enable reactions in their chat via '...' menu > Manage > Reactions.
|
||||
- Select text when typing and choose 'Formatting > Spoiler' in the context menu to hide some or all of the contents of a message.
|
||||
- Click on the spoiler in chat to reveal its hidden text.
|
||||
- Spoiler formatting hides text in chat, as well as in the chat list and notifications.
|
||||
|
||||
3.3.2 beta (29.12.21)
|
||||
|
||||
- Select text when typing and choose 'Formatting > Spoiler' in the context menu to hide some or all of the contents of a message.
|
||||
|
||||
Reference in New Issue
Block a user