Closed beta 1001007002: New channel rights.

Also fix build in Xcode.
This commit is contained in:
John Preston 2017-06-17 22:52:18 +03:00
parent c3ad0ae129
commit 401bc86f27
9 changed files with 24 additions and 23 deletions

View File

@ -9,7 +9,7 @@
<Identity Name="TelegramMessengerLLP.TelegramDesktop"
ProcessorArchitecture="ARCHITECTURE"
Publisher="CN=536BC709-8EE1-4478-AF22-F0F0F26FF64A"
Version="1.1.7.1" />
Version="1.1.7.2" />
<Properties>
<DisplayName>Telegram Desktop</DisplayName>
<PublisherDisplayName>Telegram Messenger LLP</PublisherDisplayName>

View File

@ -34,8 +34,8 @@ IDI_ICON1 ICON "..\\art\\icon256.ico"
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,1,7,1
PRODUCTVERSION 1,1,7,1
FILEVERSION 1,1,7,2
PRODUCTVERSION 1,1,7,2
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -52,10 +52,10 @@ BEGIN
BEGIN
VALUE "CompanyName", "Telegram Messenger LLP"
VALUE "FileDescription", "Telegram Desktop"
VALUE "FileVersion", "1.1.7.1"
VALUE "FileVersion", "1.1.7.2"
VALUE "LegalCopyright", "Copyright (C) 2014-2017"
VALUE "ProductName", "Telegram Desktop"
VALUE "ProductVersion", "1.1.7.1"
VALUE "ProductVersion", "1.1.7.2"
END
END
BLOCK "VarFileInfo"

View File

@ -25,8 +25,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,1,7,1
PRODUCTVERSION 1,1,7,1
FILEVERSION 1,1,7,2
PRODUCTVERSION 1,1,7,2
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -43,10 +43,10 @@ BEGIN
BEGIN
VALUE "CompanyName", "Telegram Messenger LLP"
VALUE "FileDescription", "Telegram Desktop Updater"
VALUE "FileVersion", "1.1.7.1"
VALUE "FileVersion", "1.1.7.2"
VALUE "LegalCopyright", "Copyright (C) 2014-2017"
VALUE "ProductName", "Telegram Desktop"
VALUE "ProductVersion", "1.1.7.1"
VALUE "ProductVersion", "1.1.7.2"
END
END
BLOCK "VarFileInfo"

View File

@ -689,11 +689,15 @@ namespace {
auto mask = MTPDchannel::Flag::f_broadcast | MTPDchannel::Flag::f_verified | MTPDchannel::Flag::f_megagroup | MTPDchannel::Flag::f_democracy;
cdata->flags = (cdata->flags & ~mask) | (d.vflags.v & mask);
} else {
if (d.has_admin_rights() || cdata->hasAdminRights()) {
cdata->setAdminRights(d.has_admin_rights() ? d.vadmin_rights : MTP_channelAdminRights(MTP_flags(0)));
if (d.has_admin_rights()) {
cdata->setAdminRights(d.vadmin_rights);
} else if (cdata->hasAdminRights()) {
cdata->setAdminRights(MTP_channelAdminRights(MTP_flags(0)));
}
if (d.has_banned_rights() || cdata->hasRestrictedRights()) {
cdata->setRestrictedRights(d.has_banned_rights() ? d.vbanned_rights : MTP_channelBannedRights(MTP_flags(0), MTP_int(0)));
if (d.has_banned_rights()) {
cdata->setRestrictedRights(d.vbanned_rights);
} else if (cdata->hasRestrictedRights()) {
cdata->setRestrictedRights(MTP_channelBannedRights(MTP_flags(0), MTP_int(0)));
}
cdata->inputChannel = MTP_inputChannel(d.vid, d.vaccess_hash);
cdata->access = d.vaccess_hash.v;

View File

@ -534,7 +534,7 @@ void TabbedSelector::checkRestrictedPeer() {
if (restricted) {
if (!_restrictedLabel) {
auto text = (_currentTabType == SelectorTab::Stickers) ? lang(lng_restricted_send_stickers) :
(_currentTabType == SelectorTab::Gifs) ? lang(lng_restricted_send_gifs) : false;
(_currentTabType == SelectorTab::Gifs) ? lang(lng_restricted_send_gifs) : QString();
_restrictedLabel.create(this, text, Ui::FlatLabel::InitType::Simple, st::stickersRestrictedLabel);
_restrictedLabel->show();
_restrictedLabel->move((width() - _restrictedLabel->width()), (height() / 3 - _restrictedLabel->height() / 2));

View File

@ -22,7 +22,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#include "core/utils.h"
#define BETA_VERSION_MACRO (1001007001ULL)
#define BETA_VERSION_MACRO (1001007002ULL)
constexpr int AppVersion = 1001007;
constexpr str_const AppVersionStr = "1.1.7";

View File

@ -495,7 +495,7 @@ void BannedBoxSearchController::searchDone(mtpRequestId requestId, const MTPchan
}
}
AddParticipantBoxController::AddParticipantBoxController(gsl::not_null<ChannelData*> channel, Role role, AdminDoneCallback adminDoneCallback, BannedDoneCallback bannedDoneCallback) : PeerListController(std::make_unique<AddParticipantBoxSearchController>(channel, role, &_additional))
AddParticipantBoxController::AddParticipantBoxController(gsl::not_null<ChannelData*> channel, Role role, AdminDoneCallback adminDoneCallback, BannedDoneCallback bannedDoneCallback) : PeerListController(std::make_unique<AddParticipantBoxSearchController>(channel, &_additional))
, _channel(channel)
, _role(role)
, _adminDoneCallback(std::move(adminDoneCallback))
@ -826,8 +826,7 @@ bool AddParticipantBoxController::prependRow(gsl::not_null<UserData*> user) {
}
std::unique_ptr<PeerListRow> AddParticipantBoxController::createRow(gsl::not_null<UserData*> user) const {
auto row = std::make_unique<PeerListRow>(user);
return std::move(row);
return std::make_unique<PeerListRow>(user);
}
template <typename Callback>
@ -898,9 +897,8 @@ void AddParticipantBoxController::HandleParticipant(const MTPChannelParticipant
}
}
AddParticipantBoxSearchController::AddParticipantBoxSearchController(gsl::not_null<ChannelData*> channel, Role role, gsl::not_null<Additional*> additional)
AddParticipantBoxSearchController::AddParticipantBoxSearchController(gsl::not_null<ChannelData*> channel, gsl::not_null<Additional*> additional)
: _channel(channel)
, _role(role)
, _additional(additional) {
_timer.setCallback([this] { searchOnServer(); });
}

View File

@ -177,7 +177,7 @@ public:
using Role = ParticipantsBoxController::Role;
using Additional = ParticipantsBoxController::Additional;
AddParticipantBoxSearchController(gsl::not_null<ChannelData*> channel, Role role, gsl::not_null<Additional*> additional);
AddParticipantBoxSearchController(gsl::not_null<ChannelData*> channel, gsl::not_null<Additional*> additional);
void searchQuery(const QString &query) override;
bool isLoading() override;
@ -203,7 +203,6 @@ private:
void requestGlobal();
gsl::not_null<ChannelData*> _channel;
Role _role = Role::Admins;
gsl::not_null<Additional*> _additional;
base::Timer _timer;

View File

@ -3,4 +3,4 @@ AppVersionStrMajor 1.1
AppVersionStrSmall 1.1.7
AppVersionStr 1.1.7
AlphaChannel 0
BetaVersion 1001007001
BetaVersion 1001007002