Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/telegramdesktop/tdesktop int…
Browse files Browse the repository at this point in the history
…o dev
  • Loading branch information
kirsan31 committed Feb 1, 2019
2 parents be3f66d + c47781c commit c60d0f3
Show file tree
Hide file tree
Showing 10 changed files with 41 additions and 31 deletions.
2 changes: 1 addition & 1 deletion Telegram/Resources/uwp/AppX/AppxManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<Identity Name="TelegramMessengerLLP.TelegramDesktop"
ProcessorArchitecture="ARCHITECTURE"
Publisher="CN=536BC709-8EE1-4478-AF22-F0F0F26FF64A"
Version="1.5.10.0" />
Version="1.5.11.0" />
<Properties>
<DisplayName>Telegram Desktop</DisplayName>
<PublisherDisplayName>Telegram Messenger LLP</PublisherDisplayName>
Expand Down
8 changes: 4 additions & 4 deletions Telegram/Resources/winrc/Telegram.rc
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ IDI_ICON1 ICON "..\\art\\icon256.ico"
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,5,10,0
PRODUCTVERSION 1,5,10,0
FILEVERSION 1,5,11,0
PRODUCTVERSION 1,5,11,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -52,10 +52,10 @@ BEGIN
BEGIN
VALUE "CompanyName", "Telegram Messenger LLP"
VALUE "FileDescription", "Telegram Desktop"
VALUE "FileVersion", "1.5.10.0"
VALUE "FileVersion", "1.5.11.0"
VALUE "LegalCopyright", "Copyright (C) 2014-2019"
VALUE "ProductName", "Telegram Desktop"
VALUE "ProductVersion", "1.5.10.0"
VALUE "ProductVersion", "1.5.11.0"
END
END
BLOCK "VarFileInfo"
Expand Down
8 changes: 4 additions & 4 deletions Telegram/Resources/winrc/Updater.rc
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,5,10,0
PRODUCTVERSION 1,5,10,0
FILEVERSION 1,5,11,0
PRODUCTVERSION 1,5,11,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -43,10 +43,10 @@ BEGIN
BEGIN
VALUE "CompanyName", "Telegram Messenger LLP"
VALUE "FileDescription", "Telegram Desktop Updater"
VALUE "FileVersion", "1.5.10.0"
VALUE "FileVersion", "1.5.11.0"
VALUE "LegalCopyright", "Copyright (C) 2014-2019"
VALUE "ProductName", "Telegram Desktop"
VALUE "ProductVersion", "1.5.10.0"
VALUE "ProductVersion", "1.5.11.0"
END
END
BLOCK "VarFileInfo"
Expand Down
4 changes: 3 additions & 1 deletion Telegram/SourceFiles/boxes/peers/edit_participant_box.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,9 @@ void EditAdminBox::prepare() {
const auto chat = peer()->asChat();
const auto channel = peer()->asChannel();
const auto prepareRights = hadRights ? _oldRights : Defaults(peer());
const auto disabledByDefaults = DisabledByDefaultRestrictions(peer());
const auto disabledByDefaults = (channel && !channel->isMegagroup())
? MTPDchatAdminRights::Flags(0)
: DisabledByDefaultRestrictions(peer());
const auto filterByMyRights = canSave()
&& !hadRights
&& channel
Expand Down
4 changes: 2 additions & 2 deletions Telegram/SourceFiles/core/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ For license and copyright information please follow this link:
#define TDESKTOP_ALPHA_VERSION (0ULL)
#endif // TDESKTOP_OFFICIAL_TARGET

constexpr auto AppVersion = 1005010;
constexpr auto AppVersionStr = "1.5.10 mod";
constexpr auto AppVersion = 1005011;
constexpr auto AppVersionStr = "1.5.11 mod";
constexpr auto AppBetaVersion = false;
constexpr auto AppAlphaVersion = TDESKTOP_ALPHA_VERSION;
20 changes: 10 additions & 10 deletions Telegram/SourceFiles/data/data_peer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -350,16 +350,12 @@ bool PeerData::canPinMessages() const {
if (const auto user = asUser()) {
return user->fullFlags() & MTPDuserFull::Flag::f_can_pin_message;
} else if (const auto chat = asChat()) {
return chat->amIn()
&& ((chat->adminRights() & ChatAdminRight::f_pin_messages)
|| chat->amCreator());
return chat->amIn() && !chat->amRestricted(ChatRestriction::f_pin_messages);
} else if (const auto channel = asChannel()) {
if (channel->isMegagroup()) {
return (channel->adminRights() & ChatAdminRight::f_pin_messages)
|| channel->amCreator();
}
return (channel->adminRights() & ChatAdminRight::f_edit_messages)
|| channel->amCreator();
return channel->isMegagroup()
? !channel->amRestricted(ChatRestriction::f_pin_messages)
: ((channel->adminRights() & ChatAdminRight::f_edit_messages)
|| channel->amCreator());
}
Unexpected("Peer type in PeerData::canPinMessages.");
}
Expand Down Expand Up @@ -613,9 +609,13 @@ Data::RestrictionCheckResult PeerData::amRestricted(
}
};
if (const auto channel = asChannel()) {
const auto defaultRestrictions = channel->defaultRestrictions()
| (channel->isPublic()
? (ChatRestriction::f_pin_messages | ChatRestriction::f_change_info)
: ChatRestrictions(0));
return (channel->amCreator() || allowByAdminRights(right, channel))
? Result::Allowed()
: (channel->defaultRestrictions() & right)
: (defaultRestrictions & right)
? Result::WithEveryone()
: (channel->restrictions() & right)
? Result::Explicit()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,8 @@ void HistoryWallPaper::prepareThumbnailFrom(
}
original = Images::prepare(
std::move(original),
_pixw,
(_pixw * th) / tw,
_pixw * cIntRetinaFactor(),
((_pixw * th) / tw) * cIntRetinaFactor(),
options,
_pixw,
_pixh);
Expand Down
12 changes: 8 additions & 4 deletions Telegram/SourceFiles/mediaview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,11 @@ MediaView::MediaView()
});
handleAuthSessionChange();

#ifdef OS_MAC_OLD
setWindowFlags(Qt::FramelessWindowHint);
#else // OS_MAC_OLD
#ifdef Q_OS_LINUX
setWindowFlags(Qt::FramelessWindowHint | Qt::MaximizeUsingFullscreenGeometryHint);
#endif // OS_MAC_OLD
#else // Q_OS_LINUX
setWindowFlags(Qt::FramelessWindowHint);
#endif // Q_OS_LINUX
moveToScreen();
setAttribute(Qt::WA_NoSystemBackground, true);
setAttribute(Qt::WA_TranslucentBackground, true);
Expand Down Expand Up @@ -1781,7 +1781,11 @@ void MediaView::displayFinished() {
updateControls();
if (isHidden()) {
psUpdateOverlayed(this);
#ifdef Q_OS_LINUX
showFullScreen();
#else // Q_OS_LINUX
show();
#endif // Q_OS_LINUX
psShowOverAll(this);
activateWindow();
QApplication::setActiveWindow(this);
Expand Down
6 changes: 3 additions & 3 deletions Telegram/build/version
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AppVersion 1005010
AppVersion 1005011
AppVersionStrMajor 1.5
AppVersionStrSmall 1.5.10
AppVersionStr 1.5.10
AppVersionStrSmall 1.5.11
AppVersionStr 1.5.11
BetaChannel 0
AlphaVersion 0
4 changes: 4 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
1.5.11 (01.02.19)

- Bug fixes and other minor improvements.

1.5.10 (01.02.19)

- Bug fixes and other minor improvements.
Expand Down

0 comments on commit c60d0f3

Please sign in to comment.