mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-03-18 17:40:59 +00:00
version 0.9.18: crashfix + fix of transparent gifs sending
This commit is contained in:
parent
b82adc7610
commit
f4d159b2f0
@ -20,8 +20,8 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
static const int32 AppVersion = 9017;
|
||||
static const wchar_t *AppVersionStr = L"0.9.17";
|
||||
static const int32 AppVersion = 9018;
|
||||
static const wchar_t *AppVersionStr = L"0.9.18";
|
||||
static const bool DevVersion = false;
|
||||
//#define BETA_VERSION (9015008ULL) // just comment this line to build public version
|
||||
|
||||
|
@ -1912,9 +1912,7 @@ int32 StickerPanInner::refreshInlineRows(UserData *bot, const InlineResults &res
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (_showingInlineItems) {
|
||||
clearSelection(true);
|
||||
}
|
||||
clearSelection(true);
|
||||
|
||||
t_assert(_inlineBot != 0);
|
||||
_inlineBotTitle = lng_inline_bot_results(lt_inline_bot, _inlineBot->username.isEmpty() ? _inlineBot->name : ('@' + _inlineBot->username));
|
||||
@ -1942,10 +1940,9 @@ int32 StickerPanInner::refreshInlineRows(UserData *bot, const InlineResults &res
|
||||
update();
|
||||
|
||||
emit refreshIcons();
|
||||
if (_showingInlineItems) {
|
||||
_lastMousePos = QCursor::pos();
|
||||
updateSelected();
|
||||
}
|
||||
|
||||
_lastMousePos = QCursor::pos();
|
||||
updateSelected();
|
||||
|
||||
return added;
|
||||
}
|
||||
@ -2440,10 +2437,12 @@ void StickerPanInner::showStickerSet(uint64 setId) {
|
||||
void StickerPanInner::updateShowingSavedGifs() {
|
||||
if (cShowingSavedGifs()) {
|
||||
if (!_showingInlineItems) {
|
||||
clearSelection(true);
|
||||
_showingSavedGifs = _showingInlineItems = true;
|
||||
if (_inlineRows.isEmpty()) refreshSavedGifs();
|
||||
}
|
||||
} else if (!_showingInlineItems) {
|
||||
clearSelection(true);
|
||||
_showingSavedGifs = false;
|
||||
}
|
||||
}
|
||||
|
@ -189,18 +189,25 @@ QPixmap _prepareFrame(const ClipFrameRequest &request, const QImage &original, b
|
||||
bool needOuter = (request.outerw != request.framew) || (request.outerh != request.frameh);
|
||||
if (badSize || needOuter || hasAlpha || request.rounded) {
|
||||
int32 factor(request.factor);
|
||||
bool fill = false;
|
||||
if (cache.width() != request.outerw || cache.height() != request.outerh) {
|
||||
bool newcache = (cache.width() != request.outerw || cache.height() != request.outerh);
|
||||
if (newcache) {
|
||||
cache = QImage(request.outerw, request.outerh, QImage::Format_ARGB32_Premultiplied);
|
||||
if (request.framew < request.outerw || request.frameh < request.outerh || hasAlpha) {
|
||||
fill = true;
|
||||
}
|
||||
cache.setDevicePixelRatio(factor);
|
||||
}
|
||||
{
|
||||
Painter p(&cache);
|
||||
if (fill) {
|
||||
p.fillRect(0, 0, cache.width() / factor, cache.height() / factor, st::black);
|
||||
if (newcache) {
|
||||
if (request.framew < request.outerw) {
|
||||
p.fillRect(0, 0, (request.outerw - request.framew) / (2 * factor), cache.height() / factor, st::black);
|
||||
p.fillRect((request.outerw - request.framew) / (2 * factor) + (request.framew / factor), 0, (cache.width() / factor) - ((request.outerw - request.framew) / (2 * factor) + (request.framew / factor)), cache.height() / factor, st::black);
|
||||
}
|
||||
if (request.frameh < request.outerh) {
|
||||
p.fillRect(qMax(0, (request.outerw - request.framew) / (2 * factor)), 0, qMin(cache.width(), request.framew) / factor, (request.outerh - request.frameh) / (2 * factor), st::black);
|
||||
p.fillRect(qMax(0, (request.outerw - request.framew) / (2 * factor)), (request.outerh - request.frameh) / (2 * factor) + (request.frameh / factor), qMin(cache.width(), request.framew) / factor, (cache.height() / factor) - ((request.outerh - request.frameh) / (2 * factor) + (request.frameh / factor)), st::black);
|
||||
}
|
||||
}
|
||||
if (hasAlpha) {
|
||||
p.fillRect(qMax(0, (request.outerw - request.framew) / (2 * factor)), qMax(0, (request.outerh - request.frameh) / (2 * factor)), qMin(cache.width(), request.framew) / factor, qMin(cache.height(), request.frameh) / factor, st::white);
|
||||
}
|
||||
QPoint position((request.outerw - request.framew) / (2 * factor), (request.outerh - request.frameh) / (2 * factor));
|
||||
if (badSize) {
|
||||
|
@ -4575,7 +4575,7 @@ void HistoryGif::draw(Painter &p, const HistoryItem *parent, const QRect &r, boo
|
||||
if (_data->loaded() && !radial) {
|
||||
icon = (selected ? st::msgFileInPlaySelected : st::msgFileInPlay);
|
||||
} else if (radial || _data->loading()) {
|
||||
if (parent->id > 0) {
|
||||
if (parent->id > 0 || _data->uploading()) {
|
||||
icon = (selected ? st::msgFileInCancelSelected : st::msgFileInCancel);
|
||||
}
|
||||
} else {
|
||||
|
@ -135,7 +135,7 @@ TaskQueue::~TaskQueue() {
|
||||
void TaskQueueWorker::onTaskAdded() {
|
||||
if (_inTaskAdded) return;
|
||||
_inTaskAdded = true;
|
||||
|
||||
|
||||
bool someTasksLeft = false;
|
||||
do {
|
||||
TaskPtr task;
|
||||
@ -326,7 +326,7 @@ void FileLoadTask::process() {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (filemime == qstr("video/mp4") || filename.endsWith(qstr(".mp4"), Qt::CaseInsensitive)) {
|
||||
if (filemime == qstr("video/mp4") || filename.endsWith(qstr(".mp4"), Qt::CaseInsensitive) || animated) {
|
||||
QImage cover;
|
||||
MTPDocumentAttribute animatedAttribute = clipReadAnimatedAttributes(_filepath, _content, cover);
|
||||
if (animatedAttribute.type() == mtpc_documentAttributeVideo) {
|
||||
@ -350,7 +350,9 @@ void FileLoadTask::process() {
|
||||
|
||||
thumbId = MTP::nonce<uint64>();
|
||||
|
||||
filemime = qstr("video/mp4");
|
||||
if (filename.endsWith(qstr(".mp4"), Qt::CaseInsensitive)) {
|
||||
filemime = qstr("video/mp4");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -414,7 +416,7 @@ void FileLoadTask::process() {
|
||||
_type = PrepareDocument;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
_result->type = _type;
|
||||
_result->filepath = _filepath;
|
||||
_result->content = _content;
|
||||
|
@ -11,7 +11,7 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.9.17</string>
|
||||
<string>0.9.18</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleURLTypes</key>
|
||||
|
@ -34,8 +34,8 @@ IDI_ICON1 ICON "SourceFiles\\art\\icon256.ico"
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 0,9,17,0
|
||||
PRODUCTVERSION 0,9,17,0
|
||||
FILEVERSION 0,9,18,0
|
||||
PRODUCTVERSION 0,9,18,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
@ -51,10 +51,10 @@ BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Telegram Messenger LLP"
|
||||
VALUE "FileVersion", "0.9.17.0"
|
||||
VALUE "FileVersion", "0.9.18.0"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2013"
|
||||
VALUE "ProductName", "Telegram Desktop"
|
||||
VALUE "ProductVersion", "0.9.17.0"
|
||||
VALUE "ProductVersion", "0.9.18.0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
@ -1701,7 +1701,7 @@
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 0.9.17;
|
||||
CURRENT_PROJECT_VERSION = 0.9.18;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
@ -1720,7 +1720,7 @@
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
COPY_PHASE_STRIP = YES;
|
||||
CURRENT_PROJECT_VERSION = 0.9.17;
|
||||
CURRENT_PROJECT_VERSION = 0.9.18;
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||
GCC_OPTIMIZATION_LEVEL = fast;
|
||||
GCC_PREFIX_HEADER = ./SourceFiles/stdafx.h;
|
||||
@ -1747,10 +1747,10 @@
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 0.9.17;
|
||||
CURRENT_PROJECT_VERSION = 0.9.18;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
DYLIB_COMPATIBILITY_VERSION = 0.9;
|
||||
DYLIB_CURRENT_VERSION = 0.9.17;
|
||||
DYLIB_CURRENT_VERSION = 0.9.18;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
FRAMEWORK_SEARCH_PATHS = "";
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
|
||||
@ -1882,10 +1882,10 @@
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 0.9.17;
|
||||
CURRENT_PROJECT_VERSION = 0.9.18;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
DYLIB_COMPATIBILITY_VERSION = 0.9;
|
||||
DYLIB_CURRENT_VERSION = 0.9.17;
|
||||
DYLIB_CURRENT_VERSION = 0.9.18;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
FRAMEWORK_SEARCH_PATHS = "";
|
||||
|
@ -1,6 +1,6 @@
|
||||
AppVersion 9017
|
||||
AppVersion 9018
|
||||
AppVersionStrMajor 0.9
|
||||
AppVersionStrSmall 0.9.17
|
||||
AppVersionStr 0.9.17
|
||||
AppVersionStrSmall 0.9.18
|
||||
AppVersionStr 0.9.18
|
||||
DevChannel 0
|
||||
BetaVersion 0 9015008
|
||||
|
Loading…
Reference in New Issue
Block a user