Compare commits

...

2 Commits

Author SHA1 Message Date
John Preston
26e023058c Version 1.2.6.
- Grouped Photos. Group media into an album when sharing multiple photos and videos.
Choose the exact order of media you send.
2017-12-30 13:13:48 +03:00
John Preston
6236590ca4 Fix SendFilesWay radiobuttons when adding media.
Also add /LTCG flag for static libraries Release builds on Windows.
2017-12-30 00:06:43 +03:00
9 changed files with 45 additions and 25 deletions

View File

@@ -9,7 +9,7 @@
<Identity Name="TelegramMessengerLLP.TelegramDesktop"
ProcessorArchitecture="ARCHITECTURE"
Publisher="CN=536BC709-8EE1-4478-AF22-F0F0F26FF64A"
Version="1.2.5.0" />
Version="1.2.6.0" />
<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,5,0
PRODUCTVERSION 1,2,5,0
FILEVERSION 1,2,6,0
PRODUCTVERSION 1,2,6,0
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.5.0"
VALUE "FileVersion", "1.2.6.0"
VALUE "LegalCopyright", "Copyright (C) 2014-2017"
VALUE "ProductName", "Telegram Desktop"
VALUE "ProductVersion", "1.2.5.0"
VALUE "ProductVersion", "1.2.6.0"
END
END
BLOCK "VarFileInfo"

View File

@@ -25,8 +25,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,2,5,0
PRODUCTVERSION 1,2,5,0
FILEVERSION 1,2,6,0
PRODUCTVERSION 1,2,6,0
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.5.0"
VALUE "FileVersion", "1.2.6.0"
VALUE "LegalCopyright", "Copyright (C) 2014-2017"
VALUE "ProductName", "Telegram Desktop"
VALUE "ProductVersion", "1.2.5.0"
VALUE "ProductVersion", "1.2.6.0"
END
END
BLOCK "VarFileInfo"

View File

@@ -1329,6 +1329,7 @@ SendFilesBox::SendFilesBox(
Storage::PreparedList &&list,
CompressConfirm compressed)
: _list(std::move(list))
, _compressConfirmInitial(compressed)
, _compressConfirm(compressed) {
}
@@ -1434,15 +1435,7 @@ void SendFilesBox::prepare() {
}
void SendFilesBox::initSendWay() {
_albumVideosCount = _list.albumIsPossible
? ranges::count(
_list.files,
Storage::PreparedFile::AlbumType::Video,
[](const Storage::PreparedFile &file) { return file.type; })
: 0;
_albumPhotosCount = _list.albumIsPossible
? (_list.files.size() - _albumVideosCount)
: 0;
refreshAlbumMediaCount();
const auto value = [&] {
if (_compressConfirm == CompressConfirm::None) {
return SendFilesWay::Files;
@@ -1475,6 +1468,18 @@ void SendFilesBox::initSendWay() {
});
}
void SendFilesBox::refreshAlbumMediaCount() {
_albumVideosCount = _list.albumIsPossible
? ranges::count(
_list.files,
Storage::PreparedFile::AlbumType::Video,
[](const Storage::PreparedFile &file) { return file.type; })
: 0;
_albumPhotosCount = _list.albumIsPossible
? (_list.files.size() - _albumVideosCount)
: 0;
}
void SendFilesBox::preparePreview() {
if (_list.files.size() == 1) {
prepareSingleFilePreview();
@@ -1636,6 +1641,9 @@ bool SendFilesBox::addFiles(not_null<const QMimeData*> data) {
return false;
} else if (_list.files.size() > 1 && !_albumPreview) {
return false;
} else if (_list.files.front().type
== Storage::PreparedFile::AlbumType::None) {
return false;
}
applyAlbumOrder();
delete base::take(_preview);
@@ -1646,6 +1654,9 @@ bool SendFilesBox::addFiles(not_null<const QMimeData*> data) {
_sendWay->setValue(SendFilesWay::Album);
}
_list.mergeToEnd(std::move(list));
_compressConfirm = _compressConfirmInitial;
refreshAlbumMediaCount();
preparePreview();
updateControlsGeometry();
return true;

View File

@@ -83,6 +83,7 @@ private:
not_null<Ui::ScrollArea*> wrap,
not_null<AlbumPreview*> content);
void refreshAlbumMediaCount();
void preparePreview();
void prepareSingleFilePreview();
void prepareAlbumPreview();
@@ -103,6 +104,7 @@ private:
Storage::PreparedList _list;
CompressConfirm _compressConfirmInitial = CompressConfirm::None;
CompressConfirm _compressConfirm = CompressConfirm::None;
base::lambda<void(

View File

@@ -24,7 +24,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#define BETA_VERSION_MACRO (0ULL)
constexpr int AppVersion = 1002005;
constexpr str_const AppVersionStr = "1.2.5";
constexpr bool AppAlphaVersion = true;
constexpr int AppVersion = 1002006;
constexpr str_const AppVersionStr = "1.2.6";
constexpr bool AppAlphaVersion = false;
constexpr uint64 AppBetaVersion = BETA_VERSION_MACRO;

View File

@@ -1,6 +1,6 @@
AppVersion 1002005
AppVersion 1002006
AppVersionStrMajor 1.2
AppVersionStrSmall 1.2.5
AppVersionStr 1.2.5
AlphaChannel 1
AppVersionStrSmall 1.2.6
AppVersionStr 1.2.6
AlphaChannel 0
BetaVersion 0

View File

@@ -109,6 +109,9 @@
'OptimizeReferences': '2',
'LinkTimeCodeGeneration': '1', # /LTCG
},
'VCLibrarianTool': {
'LinkTimeCodeGeneration': 'true', # /LTCG
},
},
},
},

View File

@@ -1,3 +1,7 @@
1.2.6 (30.12.17)
- Grouped Photos. Group media into an album when sharing multiple photos and videos. Choose the exact order of media you send.
1.2.5 alpha (29.12.17)
- When viewing a photo from an album, you'll see other pictures from the same group as thumbnails in the lower part of the screen.