mirror of https://github.com/procxx/kepka.git
Merge branch 'master' into notifications
This commit is contained in:
commit
a9929a5d51
|
@ -34,8 +34,8 @@ IDI_ICON1 ICON "..\\art\\icon256.ico"
|
||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION 0,10,9,0
|
FILEVERSION 0,10,11,0
|
||||||
PRODUCTVERSION 0,10,9,0
|
PRODUCTVERSION 0,10,11,0
|
||||||
FILEFLAGSMASK 0x3fL
|
FILEFLAGSMASK 0x3fL
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
|
@ -51,10 +51,10 @@ BEGIN
|
||||||
BLOCK "040904b0"
|
BLOCK "040904b0"
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "CompanyName", "Telegram Messenger LLP"
|
VALUE "CompanyName", "Telegram Messenger LLP"
|
||||||
VALUE "FileVersion", "0.10.9.0"
|
VALUE "FileVersion", "0.10.11.0"
|
||||||
VALUE "LegalCopyright", "Copyright (C) 2014-2016"
|
VALUE "LegalCopyright", "Copyright (C) 2014-2016"
|
||||||
VALUE "ProductName", "Telegram Desktop"
|
VALUE "ProductName", "Telegram Desktop"
|
||||||
VALUE "ProductVersion", "0.10.9.0"
|
VALUE "ProductVersion", "0.10.11.0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|
|
@ -25,8 +25,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION 0,10,9,0
|
FILEVERSION 0,10,11,0
|
||||||
PRODUCTVERSION 0,10,9,0
|
PRODUCTVERSION 0,10,11,0
|
||||||
FILEFLAGSMASK 0x3fL
|
FILEFLAGSMASK 0x3fL
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
|
@ -43,10 +43,10 @@ BEGIN
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "CompanyName", "Telegram Messenger LLP"
|
VALUE "CompanyName", "Telegram Messenger LLP"
|
||||||
VALUE "FileDescription", "Telegram Updater"
|
VALUE "FileDescription", "Telegram Updater"
|
||||||
VALUE "FileVersion", "0.10.9.0"
|
VALUE "FileVersion", "0.10.11.0"
|
||||||
VALUE "LegalCopyright", "Copyright (C) 2014-2016"
|
VALUE "LegalCopyright", "Copyright (C) 2014-2016"
|
||||||
VALUE "ProductName", "Telegram Desktop"
|
VALUE "ProductName", "Telegram Desktop"
|
||||||
VALUE "ProductVersion", "0.10.9.0"
|
VALUE "ProductVersion", "0.10.11.0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|
|
@ -304,9 +304,8 @@ void Application::readClients() {
|
||||||
if (!startUrl.isEmpty()) {
|
if (!startUrl.isEmpty()) {
|
||||||
cSetStartUrl(startUrl);
|
cSetStartUrl(startUrl);
|
||||||
}
|
}
|
||||||
if (!cStartUrl().isEmpty() && App::main() && App::self()) {
|
if (auto main = App::main()) {
|
||||||
App::main()->openLocalUrl(cStartUrl());
|
main->checkStartUrl();
|
||||||
cSetStartUrl(QString());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -83,11 +83,11 @@ void ReportBox::onChange() {
|
||||||
connect(_reasonOtherText, SIGNAL(submitted(bool)), this, SLOT(onReport()));
|
connect(_reasonOtherText, SIGNAL(submitted(bool)), this, SLOT(onReport()));
|
||||||
connect(_reasonOtherText, SIGNAL(cancelled()), this, SLOT(onClose()));
|
connect(_reasonOtherText, SIGNAL(cancelled()), this, SLOT(onClose()));
|
||||||
}
|
}
|
||||||
|
_reasonOtherText->setFocus();
|
||||||
} else if (_reasonOtherText) {
|
} else if (_reasonOtherText) {
|
||||||
_reasonOtherText.destroy();
|
_reasonOtherText.destroy();
|
||||||
updateMaxHeight();
|
updateMaxHeight();
|
||||||
}
|
}
|
||||||
_reasonOtherText->setFocus();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReportBox::doSetInnerFocus() {
|
void ReportBox::doSetInnerFocus() {
|
||||||
|
|
|
@ -24,7 +24,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
|
||||||
|
|
||||||
#define BETA_VERSION_MACRO (0ULL)
|
#define BETA_VERSION_MACRO (0ULL)
|
||||||
|
|
||||||
constexpr int AppVersion = 10009;
|
constexpr int AppVersion = 10011;
|
||||||
constexpr str_const AppVersionStr = "0.10.9";
|
constexpr str_const AppVersionStr = "0.10.11";
|
||||||
constexpr bool AppAlphaVersion = false;
|
constexpr bool AppAlphaVersion = false;
|
||||||
constexpr uint64 AppBetaVersion = BETA_VERSION_MACRO;
|
constexpr uint64 AppBetaVersion = BETA_VERSION_MACRO;
|
||||||
|
|
|
@ -2011,10 +2011,11 @@ bool HistoryService::prepareGameScoreText(const QString &from, QString *outText,
|
||||||
} else {
|
} else {
|
||||||
gameTitle = lang(lng_deleted_message);
|
gameTitle = lang(lng_deleted_message);
|
||||||
}
|
}
|
||||||
|
auto scoreNumber = gamescore ? gamescore->score : 0;
|
||||||
if (_from->isSelf()) {
|
if (_from->isSelf()) {
|
||||||
*outText = lng_action_game_you_scored(lt_count, gamescore->score, lt_game, gameTitle);
|
*outText = lng_action_game_you_scored(lt_count, scoreNumber, lt_game, gameTitle);
|
||||||
} else {
|
} else {
|
||||||
*outText = lng_action_game_score(lt_from, from, lt_count, gamescore->score, lt_game, gameTitle);
|
*outText = lng_action_game_score(lt_from, from, lt_count, scoreNumber, lt_game, gameTitle);
|
||||||
}
|
}
|
||||||
if (second) {
|
if (second) {
|
||||||
outLinks->push_back(second);
|
outLinks->push_back(second);
|
||||||
|
@ -2212,12 +2213,13 @@ HistoryTextState HistoryService::getState(int x, int y, HistoryStateRequest requ
|
||||||
}
|
}
|
||||||
|
|
||||||
void HistoryService::createFromMtp(const MTPDmessageService &message) {
|
void HistoryService::createFromMtp(const MTPDmessageService &message) {
|
||||||
|
if (message.vaction.type() == mtpc_messageActionGameScore) {
|
||||||
|
UpdateComponents(HistoryServiceGameScore::Bit());
|
||||||
|
Get<HistoryServiceGameScore>()->score = message.vaction.c_messageActionGameScore().vscore.v;
|
||||||
|
}
|
||||||
if (message.has_reply_to_msg_id()) {
|
if (message.has_reply_to_msg_id()) {
|
||||||
if (message.vaction.type() == mtpc_messageActionPinMessage) {
|
if (message.vaction.type() == mtpc_messageActionPinMessage) {
|
||||||
UpdateComponents(HistoryServicePinned::Bit());
|
UpdateComponents(HistoryServicePinned::Bit());
|
||||||
} else if (message.vaction.type() == mtpc_messageActionGameScore) {
|
|
||||||
UpdateComponents(HistoryServiceGameScore::Bit());
|
|
||||||
Get<HistoryServiceGameScore>()->score = message.vaction.c_messageActionGameScore().vscore.v;
|
|
||||||
}
|
}
|
||||||
if (auto dependent = GetDependentData()) {
|
if (auto dependent = GetDependentData()) {
|
||||||
dependent->msgId = message.vreply_to_msg_id.v;
|
dependent->msgId = message.vreply_to_msg_id.v;
|
||||||
|
|
|
@ -3301,10 +3301,7 @@ void MainWidget::start(const MTPUser &user) {
|
||||||
App::feedUsers(MTP_vector<MTPUser>(1, user));
|
App::feedUsers(MTP_vector<MTPUser>(1, user));
|
||||||
MTP::send(MTPupdates_GetState(), rpcDone(&MainWidget::gotState));
|
MTP::send(MTPupdates_GetState(), rpcDone(&MainWidget::gotState));
|
||||||
update();
|
update();
|
||||||
if (!cStartUrl().isEmpty()) {
|
|
||||||
openLocalUrl(cStartUrl());
|
|
||||||
cSetStartUrl(QString());
|
|
||||||
}
|
|
||||||
_started = true;
|
_started = true;
|
||||||
App::wnd()->sendServiceHistoryRequest();
|
App::wnd()->sendServiceHistoryRequest();
|
||||||
Local::readInstalledStickers();
|
Local::readInstalledStickers();
|
||||||
|
@ -3312,12 +3309,23 @@ void MainWidget::start(const MTPUser &user) {
|
||||||
Local::readRecentStickers();
|
Local::readRecentStickers();
|
||||||
Local::readSavedGifs();
|
Local::readSavedGifs();
|
||||||
_history->start();
|
_history->start();
|
||||||
|
|
||||||
|
checkStartUrl();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MainWidget::started() {
|
bool MainWidget::started() {
|
||||||
return _started;
|
return _started;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWidget::checkStartUrl() {
|
||||||
|
if (!cStartUrl().isEmpty() && App::self() && !App::passcoded()) {
|
||||||
|
auto url = cStartUrl();
|
||||||
|
cSetStartUrl(QString());
|
||||||
|
|
||||||
|
openLocalUrl(url);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MainWidget::openLocalUrl(const QString &url) {
|
void MainWidget::openLocalUrl(const QString &url) {
|
||||||
auto urlTrimmed = url.trimmed();
|
auto urlTrimmed = url.trimmed();
|
||||||
if (urlTrimmed.size() > 8192) urlTrimmed = urlTrimmed.mid(0, 8192);
|
if (urlTrimmed.size() > 8192) urlTrimmed = urlTrimmed.mid(0, 8192);
|
||||||
|
|
|
@ -155,6 +155,7 @@ public:
|
||||||
|
|
||||||
void start(const MTPUser &user);
|
void start(const MTPUser &user);
|
||||||
|
|
||||||
|
void checkStartUrl();
|
||||||
void openLocalUrl(const QString &str);
|
void openLocalUrl(const QString &str);
|
||||||
void openPeerByName(const QString &name, MsgId msgId = ShowAtUnreadMsgId, const QString &startToken = QString());
|
void openPeerByName(const QString &name, MsgId msgId = ShowAtUnreadMsgId, const QString &startToken = QString());
|
||||||
void joinGroupByHash(const QString &hash);
|
void joinGroupByHash(const QString &hash);
|
||||||
|
|
|
@ -265,6 +265,10 @@ void MainWindow::clearPasscode() {
|
||||||
notifyUpdateAll();
|
notifyUpdateAll();
|
||||||
title->updateBackButton();
|
title->updateBackButton();
|
||||||
updateGlobalMenu();
|
updateGlobalMenu();
|
||||||
|
|
||||||
|
if (auto main = App::main()) {
|
||||||
|
main->checkStartUrl();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::setupPasscode(bool anim) {
|
void MainWindow::setupPasscode(bool anim) {
|
||||||
|
@ -755,9 +759,8 @@ bool MainWindow::eventFilter(QObject *obj, QEvent *e) {
|
||||||
QString url = static_cast<QFileOpenEvent*>(e)->url().toEncoded().trimmed();
|
QString url = static_cast<QFileOpenEvent*>(e)->url().toEncoded().trimmed();
|
||||||
if (url.startsWith(qstr("tg://"), Qt::CaseInsensitive)) {
|
if (url.startsWith(qstr("tg://"), Qt::CaseInsensitive)) {
|
||||||
cSetStartUrl(url.mid(0, 8192));
|
cSetStartUrl(url.mid(0, 8192));
|
||||||
if (!cStartUrl().isEmpty() && App::main() && App::self()) {
|
if (auto main = App::main()) {
|
||||||
App::main()->openLocalUrl(cStartUrl());
|
main->checkStartUrl();
|
||||||
cSetStartUrl(QString());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
activate();
|
activate();
|
||||||
|
|
|
@ -103,7 +103,7 @@ void FadeAnimation::startAnimation(int duration) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void FadeAnimation::updateCallback() {
|
void FadeAnimation::updateCallback() {
|
||||||
if (_animation.animating(getms())) {
|
if (_animation.animating()) {
|
||||||
_widget->update();
|
_widget->update();
|
||||||
if (_updatedCallback) {
|
if (_updatedCallback) {
|
||||||
_updatedCallback(_animation.current(_visible ? 1. : 0.));
|
_updatedCallback(_animation.current(_visible ? 1. : 0.));
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
AppVersion 10009
|
AppVersion 10011
|
||||||
AppVersionStrMajor 0.10
|
AppVersionStrMajor 0.10
|
||||||
AppVersionStrSmall 0.10.9
|
AppVersionStrSmall 0.10.11
|
||||||
AppVersionStr 0.10.9
|
AppVersionStr 0.10.11
|
||||||
AlphaChannel 0
|
AlphaChannel 0
|
||||||
BetaVersion 0
|
BetaVersion 0
|
||||||
|
|
Loading…
Reference in New Issue