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 Mar 18, 2019
2 parents eb41739 + fd538bc commit c539aa6
Show file tree
Hide file tree
Showing 8 changed files with 47 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.18.0" />
Version="1.6.0.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,18,0
PRODUCTVERSION 1,5,18,0
FILEVERSION 1,6,0,0
PRODUCTVERSION 1,6,0,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.18.0"
VALUE "FileVersion", "1.6.0.0"
VALUE "LegalCopyright", "Copyright (C) 2014-2019"
VALUE "ProductName", "Telegram Desktop"
VALUE "ProductVersion", "1.5.18.0"
VALUE "ProductVersion", "1.6.0.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,18,0
PRODUCTVERSION 1,5,18,0
FILEVERSION 1,6,0,0
PRODUCTVERSION 1,6,0,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.18.0"
VALUE "FileVersion", "1.6.0.0"
VALUE "LegalCopyright", "Copyright (C) 2014-2019"
VALUE "ProductName", "Telegram Desktop"
VALUE "ProductVersion", "1.5.18.0"
VALUE "ProductVersion", "1.6.0.0"
END
END
BLOCK "VarFileInfo"
Expand Down
6 changes: 3 additions & 3 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 = 1005018;
constexpr auto AppVersionStr = "1.5.18 mod";
constexpr auto AppBetaVersion = true;
constexpr auto AppVersion = 1006000;
constexpr auto AppVersionStr = "1.6 mod";
constexpr auto AppBetaVersion = false;
constexpr auto AppAlphaVersion = TDESKTOP_ALPHA_VERSION;
31 changes: 22 additions & 9 deletions Telegram/SourceFiles/media/streaming/media_streaming_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -336,19 +336,32 @@ bool Reader::Slices::headerWontBeFilled() const {
}

void Reader::Slices::applyHeaderCacheData() {
if (_header.parts.empty() || _headerMode != HeaderMode::Unknown) {
using namespace rpl::mappers;

const auto applyWhile = [&](auto &&predicate) {
for (const auto &[offset, part] : _header.parts) {
const auto index = offset / kInSlice;
if (!predicate(index)) {
break;
}
_data[index].addPart(
offset - index * kInSlice,
base::duplicate(part));
}
};
if (_header.parts.empty()) {
return;
} else if (_headerMode == HeaderMode::Good) {
// Always apply data to first block if it is cached in the header.
applyWhile(_1 == 0);
} else if (_headerMode != HeaderMode::Unknown) {
return;
} else if (isFullInHeader()) {
headerDone(true);
return;
}
for (const auto &[offset, part] : _header.parts) {
const auto index = offset / kInSlice;
_data[index].addPart(
offset - index * kInSlice,
base::duplicate(part));
} else {
applyWhile(_1 < int(_data.size()));
headerDone(true);
}
headerDone(true);
}

void Reader::Slices::processCacheResult(
Expand Down
8 changes: 3 additions & 5 deletions Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1661,7 +1661,7 @@ void OverlayWidget::showPhoto(not_null<PhotoData*> photo, not_null<PeerData*> co

refreshMediaViewer();

displayPhoto(photo, 0);
displayPhoto(photo, nullptr);
preloadData(0);
activateControls();
}
Expand Down Expand Up @@ -1763,9 +1763,7 @@ void OverlayWidget::displayDocument(DocumentData *doc, HistoryItem *item) {
_radial.stop();

refreshMediaViewer();
if ((item ? item->fullId() : FullMsgId()) != _msgid) {
refreshCaption(item);
}
refreshCaption(item);
if (_doc) {
if (_doc->sticker()) {
if (const auto image = _doc->getStickerLarge()) {
Expand Down Expand Up @@ -3112,7 +3110,7 @@ bool OverlayWidget::moveToEntity(const Entity &entity, int preloadDelta) {
setContext(std::nullopt);
}
clearStreaming();
_streamingStartPaused = true;
_streamingStartPaused = false;
if (auto photo = base::get_if<not_null<PhotoData*>>(&entity.data)) {
displayPhoto(*photo, entity.item);
} else if (auto document = base::get_if<not_null<DocumentData*>>(&entity.data)) {
Expand Down
10 changes: 5 additions & 5 deletions Telegram/build/version
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AppVersion 1005018
AppVersionStrMajor 1.5
AppVersionStrSmall 1.5.18
AppVersionStr 1.5.18
BetaChannel 1
AppVersion 1006000
AppVersionStrMajor 1.6
AppVersionStrSmall 1.6
AppVersionStr 1.6.0
BetaChannel 0
AlphaVersion 0
5 changes: 5 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
1.6 (18.03.19)

- Play video files and listen to music without waiting for them to fully download.
- Press CTRL+0 (CMD+0 on macOS) to jump to your Saved Messages.

1.5.18 beta (15.03.19)

- Bug fixes and other minor improvements.
Expand Down

0 comments on commit c539aa6

Please sign in to comment.