1
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-04-01 14:50:24 +00:00

0.8.57 stable version with confirmation for spam reports

This commit is contained in:
John Preston 2015-09-13 12:24:15 +03:00
parent b31c997fac
commit a9319bf6a3
9 changed files with 27 additions and 18 deletions

View File

@ -1,10 +1,10 @@
@echo OFF
set "AppVersionStrMajor=0.8"
set "AppVersion=8056"
set "AppVersionStrSmall=0.8.56"
set "AppVersionStr=0.8.56"
set "AppVersionStrFull=0.8.56.0"
set "AppVersion=8057"
set "AppVersionStrSmall=0.8.57"
set "AppVersionStr=0.8.57"
set "AppVersionStrFull=0.8.57.0"
set "DevChannel=0"
if %DevChannel% neq 0 goto preparedev

View File

@ -48,7 +48,7 @@ _text(100) {
void ConfirmBox::init(const QString &text) {
_text.setText(st::boxFont, text, (_infoMsg ? _confirmBoxTextOptions : _textPlainOptions));
_textWidth = st::boxWidth - st::boxPadding.left() - st::boxPadding.right();
_textWidth = st::boxWidth + 10 - st::boxPadding.left() - st::boxPadding.right();
_textHeight = qMin(_text.countHeight(_textWidth), 16 * st::boxFont->height);
setMaxHeight(st::boxPadding.top() + _textHeight + st::boxPadding.bottom() + (_infoMsg ? _close.height() : _confirm.height()));

View File

@ -17,8 +17,8 @@ Copyright (c) 2014 John Preston, https://desktop.telegram.org
*/
#pragma once
static const int32 AppVersion = 8056;
static const wchar_t *AppVersionStr = L"0.8.56";
static const int32 AppVersion = 8057;
static const wchar_t *AppVersionStr = L"0.8.57";
static const bool DevVersion = false;
static const wchar_t *AppNameOld = L"Telegram Win (Unofficial)";

View File

@ -4640,10 +4640,18 @@ void HistoryWidget::onAudioFailed(MsgId newId) {
}
void HistoryWidget::onReportSpamClicked() {
ConfirmBox *box = new ConfirmBox(lang(_peer->chat ? lng_report_spam_sure_group : lng_report_spam_sure), lang(lng_report_spam_ok));
connect(box, SIGNAL(confirmed()), this, SLOT(onReportSpamSure()));
App::wnd()->showLayer(box);
_clearPeer = _peer;
}
void HistoryWidget::onReportSpamSure() {
if (_reportSpamRequest) return;
if (!_peer->chat) MTP::send(MTPcontacts_Block(_peer->asUser()->inputUser), rpcDone(&HistoryWidget::blockDone, _peer), RPCFailHandlerPtr(), 0, 5);
_reportSpamRequest = MTP::send(MTPmessages_ReportSpam(_peer->input), rpcDone(&HistoryWidget::reportSpamDone, _peer), rpcFail(&HistoryWidget::reportSpamFail));
App::wnd()->hideLayer();
if (!_clearPeer->chat) MTP::send(MTPcontacts_Block(_clearPeer->asUser()->inputUser), rpcDone(&HistoryWidget::blockDone, _clearPeer), RPCFailHandlerPtr(), 0, 5);
_reportSpamRequest = MTP::send(MTPmessages_ReportSpam(_clearPeer->input), rpcDone(&HistoryWidget::reportSpamDone, _clearPeer), rpcFail(&HistoryWidget::reportSpamFail));
}
void HistoryWidget::reportSpamDone(PeerData *peer, const MTPBool &result, mtpRequestId req) {
@ -4684,8 +4692,8 @@ void HistoryWidget::onReportSpamClear() {
}
void HistoryWidget::onReportSpamClearSure() {
App::wnd()->hideLayer();
if (_clearPeer->chat) {
App::wnd()->hideLayer();
App::main()->showDialogs();
MTP::send(MTPmessages_DeleteChatUser(MTP_int(_clearPeer->id & 0xFFFFFFFF), App::self()->inputUser), App::main()->rpcDone(&MainWidget::deleteHistoryAfterLeave, _clearPeer), App::main()->rpcFail(&MainWidget::leaveChatFailed, _clearPeer));
} else {

View File

@ -546,6 +546,7 @@ public slots:
void onAudioFailed(MsgId msgId);
void onReportSpamClicked();
void onReportSpamSure();
void onReportSpamHide();
void onReportSpamClear();
void onReportSpamClearSure();

View File

@ -11,7 +11,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.8.56</string>
<string>0.8.57</string>
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>CFBundleSignature</key>

Binary file not shown.

View File

@ -1707,7 +1707,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 0.8.56;
CURRENT_PROJECT_VERSION = 0.8.57;
DEBUG_INFORMATION_FORMAT = dwarf;
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
@ -1725,7 +1725,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
COPY_PHASE_STRIP = YES;
CURRENT_PROJECT_VERSION = 0.8.56;
CURRENT_PROJECT_VERSION = 0.8.57;
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
GCC_OPTIMIZATION_LEVEL = fast;
GCC_PREFIX_HEADER = ./SourceFiles/stdafx.h;
@ -1751,10 +1751,10 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 0.8.56;
CURRENT_PROJECT_VERSION = 0.8.57;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DYLIB_COMPATIBILITY_VERSION = 0.8;
DYLIB_CURRENT_VERSION = 0.8.56;
DYLIB_CURRENT_VERSION = 0.8.57;
ENABLE_STRICT_OBJC_MSGSEND = YES;
FRAMEWORK_SEARCH_PATHS = "";
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
@ -1885,10 +1885,10 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 0.8.56;
CURRENT_PROJECT_VERSION = 0.8.57;
DEBUG_INFORMATION_FORMAT = dwarf;
DYLIB_COMPATIBILITY_VERSION = 0.8;
DYLIB_CURRENT_VERSION = 0.8.56;
DYLIB_CURRENT_VERSION = 0.8.57;
ENABLE_STRICT_OBJC_MSGSEND = YES;
FRAMEWORK_SEARCH_PATHS = "";
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;

View File

@ -1,2 +1,2 @@
echo 0.8 8056 0.8.56 0
echo 0.8 8057 0.8.57 0
# AppVersionStrMajor AppVersion AppVersionStr DevChannel