mirror of
https://github.com/vale981/tdesktop
synced 2025-03-07 02:31:41 -05:00
Merge branch 'master' of https://github.com/telegramdesktop/tdesktop
This commit is contained in:
commit
295b63bc0d
6 changed files with 29 additions and 18 deletions
|
@ -20,8 +20,8 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
|
|||
*/
|
||||
#pragma once
|
||||
|
||||
static const int32 AppVersion = 9032;
|
||||
static const wchar_t *AppVersionStr = L"0.9.32";
|
||||
static const int32 AppVersion = 9033;
|
||||
static const wchar_t *AppVersionStr = L"0.9.33";
|
||||
static const bool DevVersion = false;
|
||||
//#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();
|
||||
}
|
||||
if (_pinnedBar) {
|
||||
delete _pinnedBar;
|
||||
_pinnedBar = nullptr;
|
||||
_inPinnedMsg = false;
|
||||
destroyPinnedBar();
|
||||
}
|
||||
_history = _migrated = 0;
|
||||
updateBotKeyboard();
|
||||
|
@ -6842,9 +6840,7 @@ void HistoryWidget::updatePinnedBar(bool force) {
|
|||
if (_peer && _peer->isMegagroup()) {
|
||||
_peer->asChannel()->mgInfo->pinnedMsgId = 0;
|
||||
}
|
||||
delete _pinnedBar;
|
||||
_pinnedBar = nullptr;
|
||||
_inPinnedMsg = false;
|
||||
destroyPinnedBar();
|
||||
resizeEvent(0);
|
||||
update();
|
||||
}
|
||||
|
@ -6892,8 +6888,7 @@ bool HistoryWidget::pinnedMsgVisibilityUpdated() {
|
|||
App::api()->requestMessageData(_peer->asChannel(), _pinnedBar->msgId, new ReplyEditMessageDataCallback());
|
||||
}
|
||||
} else if (_pinnedBar) {
|
||||
delete _pinnedBar;
|
||||
_pinnedBar = nullptr;
|
||||
destroyPinnedBar();
|
||||
result = true;
|
||||
_scroll.scrollToY(_scroll.scrollTop() - st::replyHeight);
|
||||
resizeEvent(0);
|
||||
|
@ -6901,6 +6896,12 @@ bool HistoryWidget::pinnedMsgVisibilityUpdated() {
|
|||
return result;
|
||||
}
|
||||
|
||||
void HistoryWidget::destroyPinnedBar() {
|
||||
delete _pinnedBar;
|
||||
_pinnedBar = nullptr;
|
||||
_inPinnedMsg = false;
|
||||
}
|
||||
|
||||
void HistoryWidget::ReplyEditMessageDataCallback::call(ChannelData *channel, MsgId msgId) const {
|
||||
if (App::main()) {
|
||||
App::main()->messageDataReceived(channel, msgId);
|
||||
|
|
|
@ -736,6 +736,7 @@ private:
|
|||
PinnedBar *_pinnedBar;
|
||||
void updatePinnedBar(bool force = false);
|
||||
bool pinnedMsgVisibilityUpdated();
|
||||
void destroyPinnedBar();
|
||||
void unpinDone(const MTPUpdates &updates);
|
||||
|
||||
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
|
||||
PlatformSpecific::start(); // must be started before QApplication is created
|
||||
|
||||
//QByteArray args[] = { "-style=0" }; // prepare fake args to disable QT_STYLE_OVERRIDE env variable
|
||||
//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() };
|
||||
// prepare fake args to disable QT_STYLE_OVERRIDE env variable
|
||||
// currently this is required in some desktop environments, including Xubuntu 15.10
|
||||
// when we don't default style to "none" Qt dynamically loads GTK somehow internally and
|
||||
// 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;
|
||||
{
|
||||
Application app(argc, argv);
|
||||
Application app(a_argc, a_argv);
|
||||
result = app.exec();
|
||||
}
|
||||
|
||||
|
|
|
@ -2166,6 +2166,8 @@ void MainWidget::scheduleViewIncrement(HistoryItem *item) {
|
|||
}
|
||||
|
||||
void MainWidget::onViewsIncrement() {
|
||||
if (!App::main() || !MTP::authedId()) return;
|
||||
|
||||
for (ViewsIncrement::iterator i = _viewsToIncrement.begin(); i != _viewsToIncrement.cend();) {
|
||||
if (_viewsIncrementRequests.contains(i.key())) {
|
||||
++i;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
AppVersion 9032
|
||||
AppVersion 9033
|
||||
AppVersionStrMajor 0.9
|
||||
AppVersionStrSmall 0.9.32
|
||||
AppVersionStr 0.9.32
|
||||
AppVersionStrSmall 0.9.33
|
||||
AppVersionStr 0.9.33
|
||||
DevChannel 0
|
||||
BetaVersion 0 9030002
|
||||
|
|
Loading…
Add table
Reference in a new issue