mirror of https://github.com/procxx/kepka.git
Merge branch 'master' of https://github.com/telegramdesktop/tdesktop
This commit is contained in:
commit
295b63bc0d
|
@ -20,8 +20,8 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
static const int32 AppVersion = 9032;
|
static const int32 AppVersion = 9033;
|
||||||
static const wchar_t *AppVersionStr = L"0.9.32";
|
static const wchar_t *AppVersionStr = L"0.9.33";
|
||||||
static const bool DevVersion = false;
|
static const bool DevVersion = false;
|
||||||
//#define BETA_VERSION (9030002ULL) // just comment this line to build public version
|
//#define BETA_VERSION (9030002ULL) // just comment this line to build public version
|
||||||
|
|
||||||
|
|
|
@ -3606,9 +3606,7 @@ void HistoryWidget::showHistory(const PeerId &peerId, MsgId showAtMsgId, bool re
|
||||||
_migrated->unreadBar->destroy();
|
_migrated->unreadBar->destroy();
|
||||||
}
|
}
|
||||||
if (_pinnedBar) {
|
if (_pinnedBar) {
|
||||||
delete _pinnedBar;
|
destroyPinnedBar();
|
||||||
_pinnedBar = nullptr;
|
|
||||||
_inPinnedMsg = false;
|
|
||||||
}
|
}
|
||||||
_history = _migrated = 0;
|
_history = _migrated = 0;
|
||||||
updateBotKeyboard();
|
updateBotKeyboard();
|
||||||
|
@ -6842,9 +6840,7 @@ void HistoryWidget::updatePinnedBar(bool force) {
|
||||||
if (_peer && _peer->isMegagroup()) {
|
if (_peer && _peer->isMegagroup()) {
|
||||||
_peer->asChannel()->mgInfo->pinnedMsgId = 0;
|
_peer->asChannel()->mgInfo->pinnedMsgId = 0;
|
||||||
}
|
}
|
||||||
delete _pinnedBar;
|
destroyPinnedBar();
|
||||||
_pinnedBar = nullptr;
|
|
||||||
_inPinnedMsg = false;
|
|
||||||
resizeEvent(0);
|
resizeEvent(0);
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
@ -6892,8 +6888,7 @@ bool HistoryWidget::pinnedMsgVisibilityUpdated() {
|
||||||
App::api()->requestMessageData(_peer->asChannel(), _pinnedBar->msgId, new ReplyEditMessageDataCallback());
|
App::api()->requestMessageData(_peer->asChannel(), _pinnedBar->msgId, new ReplyEditMessageDataCallback());
|
||||||
}
|
}
|
||||||
} else if (_pinnedBar) {
|
} else if (_pinnedBar) {
|
||||||
delete _pinnedBar;
|
destroyPinnedBar();
|
||||||
_pinnedBar = nullptr;
|
|
||||||
result = true;
|
result = true;
|
||||||
_scroll.scrollToY(_scroll.scrollTop() - st::replyHeight);
|
_scroll.scrollToY(_scroll.scrollTop() - st::replyHeight);
|
||||||
resizeEvent(0);
|
resizeEvent(0);
|
||||||
|
@ -6901,6 +6896,12 @@ bool HistoryWidget::pinnedMsgVisibilityUpdated() {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void HistoryWidget::destroyPinnedBar() {
|
||||||
|
delete _pinnedBar;
|
||||||
|
_pinnedBar = nullptr;
|
||||||
|
_inPinnedMsg = false;
|
||||||
|
}
|
||||||
|
|
||||||
void HistoryWidget::ReplyEditMessageDataCallback::call(ChannelData *channel, MsgId msgId) const {
|
void HistoryWidget::ReplyEditMessageDataCallback::call(ChannelData *channel, MsgId msgId) const {
|
||||||
if (App::main()) {
|
if (App::main()) {
|
||||||
App::main()->messageDataReceived(channel, msgId);
|
App::main()->messageDataReceived(channel, msgId);
|
||||||
|
|
|
@ -736,6 +736,7 @@ private:
|
||||||
PinnedBar *_pinnedBar;
|
PinnedBar *_pinnedBar;
|
||||||
void updatePinnedBar(bool force = false);
|
void updatePinnedBar(bool force = false);
|
||||||
bool pinnedMsgVisibilityUpdated();
|
bool pinnedMsgVisibilityUpdated();
|
||||||
|
void destroyPinnedBar();
|
||||||
void unpinDone(const MTPUpdates &updates);
|
void unpinDone(const MTPUpdates &updates);
|
||||||
|
|
||||||
class ReplyEditMessageDataCallback : public SharedCallback2<void, ChannelData*, MsgId> {
|
class ReplyEditMessageDataCallback : public SharedCallback2<void, ChannelData*, MsgId> {
|
||||||
|
|
|
@ -38,14 +38,21 @@ int main(int argc, char *argv[]) {
|
||||||
Logs::start(); // must be started before PlatformSpecific is started
|
Logs::start(); // must be started before PlatformSpecific is started
|
||||||
PlatformSpecific::start(); // must be started before QApplication is created
|
PlatformSpecific::start(); // must be started before QApplication is created
|
||||||
|
|
||||||
//QByteArray args[] = { "-style=0" }; // prepare fake args to disable QT_STYLE_OVERRIDE env variable
|
// prepare fake args to disable QT_STYLE_OVERRIDE env variable
|
||||||
//static const int a_cnt = sizeof(args) / sizeof(args[0]);
|
// currently this is required in some desktop environments, including Xubuntu 15.10
|
||||||
//int a_argc = a_cnt + 1;
|
// when we don't default style to "none" Qt dynamically loads GTK somehow internally and
|
||||||
//char *a_argv[a_cnt + 1] = { argv[0], args[0].data() };
|
// our own GTK dynamic load and usage leads GTK errors and freeze of the current main thread
|
||||||
|
// we can't disable our own GTK loading because it is required by libappindicator, which
|
||||||
|
// provides the tray icon for this system, because Qt tray icon is broken there
|
||||||
|
// see https://github.com/telegramdesktop/tdesktop/issues/1774
|
||||||
|
QByteArray args[] = { "-style=0" };
|
||||||
|
static const int a_cnt = sizeof(args) / sizeof(args[0]);
|
||||||
|
int a_argc = a_cnt + 1;
|
||||||
|
char *a_argv[a_cnt + 1] = { argv[0], args[0].data() };
|
||||||
|
|
||||||
int result = 0;
|
int result = 0;
|
||||||
{
|
{
|
||||||
Application app(argc, argv);
|
Application app(a_argc, a_argv);
|
||||||
result = app.exec();
|
result = app.exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2166,6 +2166,8 @@ void MainWidget::scheduleViewIncrement(HistoryItem *item) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWidget::onViewsIncrement() {
|
void MainWidget::onViewsIncrement() {
|
||||||
|
if (!App::main() || !MTP::authedId()) return;
|
||||||
|
|
||||||
for (ViewsIncrement::iterator i = _viewsToIncrement.begin(); i != _viewsToIncrement.cend();) {
|
for (ViewsIncrement::iterator i = _viewsToIncrement.begin(); i != _viewsToIncrement.cend();) {
|
||||||
if (_viewsIncrementRequests.contains(i.key())) {
|
if (_viewsIncrementRequests.contains(i.key())) {
|
||||||
++i;
|
++i;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
AppVersion 9032
|
AppVersion 9033
|
||||||
AppVersionStrMajor 0.9
|
AppVersionStrMajor 0.9
|
||||||
AppVersionStrSmall 0.9.32
|
AppVersionStrSmall 0.9.33
|
||||||
AppVersionStr 0.9.32
|
AppVersionStr 0.9.33
|
||||||
DevChannel 0
|
DevChannel 0
|
||||||
BetaVersion 0 9030002
|
BetaVersion 0 9030002
|
||||||
|
|
Loading…
Reference in New Issue