Closed beta 1.2.8.5.

This commit is contained in:
John Preston 2018-02-07 19:37:05 +03:00
parent 99c686e3e1
commit f23c23f696
10 changed files with 55 additions and 46 deletions

View file

@ -273,7 +273,7 @@ messageActionCustomAction#fae69f56 message:string = MessageAction;
messageActionBotAllowed#abe9affe domain:string = MessageAction;
dialog#e4def5db flags:# pinned:flags.2?true peer:Peer top_message:int read_inbox_max_id:int read_outbox_max_id:int unread_count:int unread_mentions_count:int notify_settings:PeerNotifySettings pts:flags.0?int draft:flags.1?DraftMessage = Dialog;
dialogFeed#36086d42 flags:# pinned:flags.2?true peer:Peer top_message:int feed_id:int feed_other_channels:Vector<int> read_max_position:flags.3?FeedPosition unread_count:int unread_muted_count:int = Dialog;
dialogFeed#907750e4 flags:# pinned:flags.2?true peer:Peer top_message:int feed_id:int feed_other_channels:Vector<int> read_max_position:flags.3?FeedPosition unread_count:int unread_muted_count:int sources_hash:int = Dialog;
photoEmpty#2331b22d id:long = Photo;
photo#9288dd29 flags:# has_stickers:flags.0?true id:long access_hash:long date:int sizes:Vector<PhotoSize> = Photo;
@ -942,6 +942,14 @@ help.recentMeUrls#e0310d7 urls:Vector<RecentMeUrl> chats:Vector<Chat> users:Vect
inputSingleMedia#1cc6e91f flags:# media:InputMedia random_id:long message:string entities:flags.0?Vector<MessageEntity> = InputSingleMedia;
webAuthorization#cac943f2 hash:long bot_id:int domain:string browser:string platform:string date_created:int date_active:int ip:string region:string = WebAuthorization;
account.webAuthorizations#ed56c9fc authorizations:Vector<WebAuthorization> users:Vector<User> = account.WebAuthorizations;
inputMessageID#a676a322 id:int = InputMessage;
inputMessageReplyTo#bad88395 id:int = InputMessage;
inputMessagePinned#86872538 = InputMessage;
feedPosition#5059dc73 date:int peer:Peer id:int = FeedPosition;
messages.feedMessagesNotModified#4678d0cf = messages.FeedMessages;
@ -959,14 +967,6 @@ inputDialogPeer#fcaafeb7 peer:InputPeer = InputDialogPeer;
dialogPeerFeed#da429411 feed_id:int = DialogPeer;
dialogPeer#e56dbf05 peer:Peer = DialogPeer;
webAuthorization#cac943f2 hash:long bot_id:int domain:string browser:string platform:string date_created:int date_active:int ip:string region:string = WebAuthorization;
account.webAuthorizations#ed56c9fc authorizations:Vector<WebAuthorization> users:Vector<User> = account.WebAuthorizations;
inputMessageID#a676a322 id:int = InputMessage;
inputMessageReplyTo#bad88395 id:int = InputMessage;
inputMessagePinned#86872538 = InputMessage;
---functions---
invokeAfterMsg#cb9f372d {X:Type} msg_id:long query:!X = X;

View file

@ -9,7 +9,7 @@
<Identity Name="TelegramMessengerLLP.TelegramDesktop"
ProcessorArchitecture="ARCHITECTURE"
Publisher="CN=536BC709-8EE1-4478-AF22-F0F0F26FF64A"
Version="1.2.8.4" />
Version="1.2.8.5" />
<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,2,8,4
PRODUCTVERSION 1,2,8,4
FILEVERSION 1,2,8,5
PRODUCTVERSION 1,2,8,5
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -52,10 +52,10 @@ BEGIN
BEGIN
VALUE "CompanyName", "Telegram Messenger LLP"
VALUE "FileDescription", "Telegram Desktop"
VALUE "FileVersion", "1.2.8.4"
VALUE "FileVersion", "1.2.8.5"
VALUE "LegalCopyright", "Copyright (C) 2014-2018"
VALUE "ProductName", "Telegram Desktop"
VALUE "ProductVersion", "1.2.8.4"
VALUE "ProductVersion", "1.2.8.5"
END
END
BLOCK "VarFileInfo"

View file

@ -25,8 +25,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,2,8,4
PRODUCTVERSION 1,2,8,4
FILEVERSION 1,2,8,5
PRODUCTVERSION 1,2,8,5
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.2.8.4"
VALUE "FileVersion", "1.2.8.5"
VALUE "LegalCopyright", "Copyright (C) 2014-2018"
VALUE "ProductName", "Telegram Desktop"
VALUE "ProductVersion", "1.2.8.4"
VALUE "ProductVersion", "1.2.8.5"
END
END
BLOCK "VarFileInfo"

View file

@ -3068,6 +3068,10 @@ void ApiWrap::requestFeedMessages(
feedMessagesDone(feed, messageId, slice, result);
}).fail([=](const RPCError &error) {
_feedMessagesRequests.remove(key);
if (error.type() == qstr("SOURCES_HASH_INVALID")) {
_feedMessagesRequestsPending.emplace(key);
requestFeedChannels(feed);
}
}).send();
_feedMessagesRequests.emplace(key);
}

View file

@ -9,7 +9,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "core/utils.h"
#define BETA_VERSION_MACRO (1002008004ULL)
#define BETA_VERSION_MACRO (1002008005ULL)
constexpr int AppVersion = 1002008;
constexpr str_const AppVersionStr = "1.2.8";

View file

@ -165,11 +165,12 @@ const std::vector<not_null<History*>> &Feed::channels() const {
}
int32 Feed::channelsHash() const {
return Api::CountHash(ranges::view::all(
const auto ordered = ranges::view::all(
_channels
) | ranges::view::transform([](not_null<History*> history) {
return history->peer->bareId();
}));
}) | ranges::to_vector | ranges::action::sort;
return Api::CountHash(ordered);
}
bool Feed::channelsLoaded() const {
@ -177,7 +178,10 @@ bool Feed::channelsLoaded() const {
}
void Feed::setChannelsLoaded(bool loaded) {
_channelsLoaded = loaded;
if (_channelsLoaded != loaded) {
_channelsLoaded = loaded;
_parent->notifyFeedUpdated(this, FeedUpdateFlag::Channels);
}
}
void Feed::setChannels(std::vector<not_null<ChannelData*>> channels) {
@ -219,9 +223,7 @@ void Feed::setChannels(std::vector<not_null<ChannelData*>> channels) {
_channels.push_back(App::history(channel));
}
_channelsLoaded = true;
_parent->notifyFeedUpdated(this, FeedUpdateFlag::Channels);
setChannelsLoaded(true);
}
bool Feed::justUpdateLastMessage(not_null<HistoryItem*> item) {
@ -326,6 +328,10 @@ void Feed::applyDialog(const MTPDdialogFeed &data) {
if (data.has_read_max_position()) {
setUnreadPosition(FeedPositionFromMTP(data.vread_max_position));
}
if (channelsHash() != data.vsources_hash.v) {
setChannelsLoaded(false);
}
}
void Feed::setUnreadCounts(int unreadNonMutedCount, int unreadMutedCount) {

View file

@ -40,26 +40,26 @@ object_ptr<Ui::RpWidget> InnerWidget::setupContent(
_cover = result->add(object_ptr<Cover>(
result,
_controller));
auto details = Profile::SetupFeedDetails(_controller, parent, _feed);
result->add(std::move(details));
result->add(object_ptr<BoxContentDivider>(result));
//auto details = Profile::SetupFeedDetails(_controller, parent, _feed);
//result->add(std::move(details));
//result->add(object_ptr<BoxContentDivider>(result));
_channels = result->add(object_ptr<Channels>(
result,
_controller)
);
_channels->scrollToRequests(
) | rpl::start_with_next([this](Ui::ScrollToRequest request) {
auto min = (request.ymin < 0)
? request.ymin
: mapFromGlobal(_channels->mapToGlobal({ 0, request.ymin })).y();
auto max = (request.ymin < 0)
? mapFromGlobal(_channels->mapToGlobal({ 0, 0 })).y()
: (request.ymax < 0)
? request.ymax
: mapFromGlobal(_channels->mapToGlobal({ 0, request.ymax })).y();
_scrollToRequests.fire({ min, max });
}, _channels->lifetime());
//_channels = result->add(object_ptr<Channels>(
// result,
// _controller)
//);
//_channels->scrollToRequests(
//) | rpl::start_with_next([this](Ui::ScrollToRequest request) {
// auto min = (request.ymin < 0)
// ? request.ymin
// : mapFromGlobal(_channels->mapToGlobal({ 0, request.ymin })).y();
// auto max = (request.ymin < 0)
// ? mapFromGlobal(_channels->mapToGlobal({ 0, 0 })).y()
// : (request.ymax < 0)
// ? request.ymax
// : mapFromGlobal(_channels->mapToGlobal({ 0, request.ymax })).y();
// _scrollToRequests.fire({ min, max });
//}, _channels->lifetime());
return std::move(result);
}

View file

@ -97,4 +97,3 @@ void Widget::restoreState(not_null<Memento*> memento) {
} // namespace Members
} // namespace Info

View file

@ -3,4 +3,4 @@ AppVersionStrMajor 1.2
AppVersionStrSmall 1.2.8
AppVersionStr 1.2.8
AlphaChannel 0
BetaVersion 1002008004
BetaVersion 1002008005