mirror of
https://github.com/vale981/tdesktop
synced 2025-03-06 02:01:40 -05:00
Closed beta 10020004: stickers box fixed, manage admins box fixed.
This commit is contained in:
parent
eb4d2a38b6
commit
1d895cd953
10 changed files with 65 additions and 57 deletions
Binary file not shown.
Before Width: | Height: | Size: 137 B After Width: | Height: | Size: 156 B |
Binary file not shown.
Before Width: | Height: | Size: 221 B After Width: | Height: | Size: 247 B |
|
@ -34,8 +34,8 @@ IDI_ICON1 ICON "..\\art\\icon256.ico"
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 0,10,20,3
|
||||
PRODUCTVERSION 0,10,20,3
|
||||
FILEVERSION 0,10,20,4
|
||||
PRODUCTVERSION 0,10,20,4
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
|
@ -51,10 +51,10 @@ BEGIN
|
|||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Telegram Messenger LLP"
|
||||
VALUE "FileVersion", "0.10.20.3"
|
||||
VALUE "FileVersion", "0.10.20.4"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2014-2016"
|
||||
VALUE "ProductName", "Telegram Desktop"
|
||||
VALUE "ProductVersion", "0.10.20.3"
|
||||
VALUE "ProductVersion", "0.10.20.4"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
|
@ -25,8 +25,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 0,10,20,3
|
||||
PRODUCTVERSION 0,10,20,3
|
||||
FILEVERSION 0,10,20,4
|
||||
PRODUCTVERSION 0,10,20,4
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
|
@ -43,10 +43,10 @@ BEGIN
|
|||
BEGIN
|
||||
VALUE "CompanyName", "Telegram Messenger LLP"
|
||||
VALUE "FileDescription", "Telegram Updater"
|
||||
VALUE "FileVersion", "0.10.20.3"
|
||||
VALUE "FileVersion", "0.10.20.4"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2014-2016"
|
||||
VALUE "ProductName", "Telegram Desktop"
|
||||
VALUE "ProductVersion", "0.10.20.3"
|
||||
VALUE "ProductVersion", "0.10.20.4"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
|
@ -48,17 +48,19 @@ void BoxContent::setInner(object_ptr<TWidget> inner) {
|
|||
void BoxContent::setInner(object_ptr<TWidget> inner, const style::ScrollArea &st) {
|
||||
if (inner) {
|
||||
getDelegate()->setLayerType(true);
|
||||
if (!_scroll) {
|
||||
_scroll.create(this, st);
|
||||
connect(_scroll, SIGNAL(scrolled()), this, SLOT(onScroll()));
|
||||
connect(_scroll, SIGNAL(innerResized()), this, SLOT(onInnerResize()));
|
||||
|
||||
_scroll.create(this, st);
|
||||
_scroll->setGeometryToLeft(0, _innerTopSkip, width(), 0);
|
||||
_scroll->setOwnedWidget(std_::move(inner));
|
||||
if (_topShadow) {
|
||||
_topShadow->raise();
|
||||
_bottomShadow->raise();
|
||||
} else {
|
||||
_topShadow.create(this, object_ptr<BoxLayerTitleShadow>(this));
|
||||
_bottomShadow.create(this, object_ptr<BoxLayerTitleShadow>(this));
|
||||
}
|
||||
_scroll->setGeometryToLeft(0, _innerTopSkip, width(), 0);
|
||||
_scroll->setOwnedWidget(std_::move(inner));
|
||||
updateScrollAreaGeometry();
|
||||
connect(_scroll, SIGNAL(scrolled()), this, SLOT(onScroll()));
|
||||
connect(_scroll, SIGNAL(innerResized()), this, SLOT(onInnerResize()));
|
||||
} else {
|
||||
getDelegate()->setLayerType(false);
|
||||
_scroll.destroyDelayed();
|
||||
|
|
|
@ -39,8 +39,8 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
|
|||
|
||||
namespace {
|
||||
|
||||
constexpr int kArchivedLimitFirstRequest = 1;// 10;
|
||||
constexpr int kArchivedLimitPerPage = 1;// 30;
|
||||
constexpr int kArchivedLimitFirstRequest = 10;
|
||||
constexpr int kArchivedLimitPerPage = 30;
|
||||
|
||||
} // namespace
|
||||
|
||||
|
@ -401,6 +401,7 @@ void StickersBox::switchTab() {
|
|||
_tab = newTab;
|
||||
_section = newSection;
|
||||
setInnerWidget(_tab->takeWidget(), getTopSkip());
|
||||
_tabs->raise();
|
||||
_tab->widget()->show();
|
||||
rebuildList();
|
||||
onScrollToY(_tab->getScrollTop());
|
||||
|
@ -449,8 +450,6 @@ void StickersBox::installSet(uint64 setId) {
|
|||
void StickersBox::installDone(const MTPmessages_StickerSetInstallResult &result) {
|
||||
if (result.type() == mtpc_messages_stickerSetInstallResultArchive) {
|
||||
Stickers::applyArchivedResult(result.c_messages_stickerSetInstallResultArchive());
|
||||
} else {
|
||||
Stickers::applyArchivedResultFake();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -520,22 +519,28 @@ void StickersBox::onStickersUpdated() {
|
|||
}
|
||||
}
|
||||
|
||||
void StickersBox::rebuildList() {
|
||||
if (_tab == &_installed) {
|
||||
_localOrder = _tab->widget()->getFullOrder();
|
||||
_localRemoved = _tab->widget()->getRemovedSets();
|
||||
void StickersBox::rebuildList(Tab *tab) {
|
||||
if (!tab) tab = _tab;
|
||||
|
||||
if (tab == &_installed) {
|
||||
_localOrder = tab->widget()->getFullOrder();
|
||||
_localRemoved = tab->widget()->getRemovedSets();
|
||||
}
|
||||
_tab->widget()->rebuild();
|
||||
if (_tab == &_installed) {
|
||||
_tab->widget()->setFullOrder(_localOrder);
|
||||
tab->widget()->rebuild();
|
||||
if (tab == &_installed) {
|
||||
tab->widget()->setFullOrder(_localOrder);
|
||||
}
|
||||
_tab->widget()->setRemovedSets(_localRemoved);
|
||||
tab->widget()->setRemovedSets(_localRemoved);
|
||||
}
|
||||
|
||||
void StickersBox::closeHook() {
|
||||
if (!_installed.widget()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Make sure that our changes in other tabs are applied in the Installed tab.
|
||||
rebuildList(&_installed);
|
||||
|
||||
if (_someArchivedLoaded) {
|
||||
Local::writeArchivedStickers();
|
||||
}
|
||||
|
|
|
@ -62,31 +62,6 @@ private slots:
|
|||
void onStickersUpdated();
|
||||
|
||||
private:
|
||||
void refreshTabs();
|
||||
void rebuildList();
|
||||
void updateTabsGeometry();
|
||||
void switchTab();
|
||||
void installSet(uint64 setId);
|
||||
int getTopSkip() const;
|
||||
|
||||
QPixmap grabContentCache();
|
||||
|
||||
void installDone(const MTPmessages_StickerSetInstallResult &result);
|
||||
bool installFail(uint64 setId, const RPCError &error);
|
||||
|
||||
void preloadArchivedSets();
|
||||
void requestArchivedSets();
|
||||
void loadMoreArchived();
|
||||
void getArchivedDone(uint64 offsetId, const MTPmessages_ArchivedStickers &result);
|
||||
|
||||
object_ptr<Ui::SettingsSlider> _tabs = { nullptr };
|
||||
QList<Section> _tabIndices;
|
||||
|
||||
class CounterWidget;
|
||||
object_ptr<CounterWidget> _unreadBadge = { nullptr };
|
||||
|
||||
Section _section;
|
||||
|
||||
class Inner;
|
||||
class Tab {
|
||||
public:
|
||||
|
@ -117,6 +92,32 @@ private:
|
|||
int _scrollTop = 0;
|
||||
|
||||
};
|
||||
|
||||
void refreshTabs();
|
||||
void rebuildList(Tab *tab = nullptr);
|
||||
void updateTabsGeometry();
|
||||
void switchTab();
|
||||
void installSet(uint64 setId);
|
||||
int getTopSkip() const;
|
||||
|
||||
QPixmap grabContentCache();
|
||||
|
||||
void installDone(const MTPmessages_StickerSetInstallResult &result);
|
||||
bool installFail(uint64 setId, const RPCError &error);
|
||||
|
||||
void preloadArchivedSets();
|
||||
void requestArchivedSets();
|
||||
void loadMoreArchived();
|
||||
void getArchivedDone(uint64 offsetId, const MTPmessages_ArchivedStickers &result);
|
||||
|
||||
object_ptr<Ui::SettingsSlider> _tabs = { nullptr };
|
||||
QList<Section> _tabIndices;
|
||||
|
||||
class CounterWidget;
|
||||
object_ptr<CounterWidget> _unreadBadge = { nullptr };
|
||||
|
||||
Section _section;
|
||||
|
||||
Tab _installed;
|
||||
Tab _featured;
|
||||
Tab _archived;
|
||||
|
|
|
@ -22,7 +22,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
|
|||
|
||||
#include "core/utils.h"
|
||||
|
||||
#define BETA_VERSION_MACRO (10020003ULL)
|
||||
#define BETA_VERSION_MACRO (10020004ULL)
|
||||
|
||||
constexpr int AppVersion = 10020;
|
||||
constexpr str_const AppVersionStr = "0.10.20";
|
||||
|
|
|
@ -677,11 +677,11 @@ defaultSettingsSlider: SettingsSlider {
|
|||
}
|
||||
|
||||
defaultTabsSlider: SettingsSlider(defaultSettingsSlider) {
|
||||
height: 49px;
|
||||
barTop: 46px;
|
||||
height: 53px;
|
||||
barTop: 50px;
|
||||
barSkip: 0px;
|
||||
barFg: transparent;
|
||||
labelTop: 16px;
|
||||
labelTop: 19px;
|
||||
labelFont: semiboldFont;
|
||||
labelFg: windowSubTextFg;
|
||||
labelFgActive: lightButtonFg;
|
||||
|
|
|
@ -3,4 +3,4 @@ AppVersionStrMajor 0.10
|
|||
AppVersionStrSmall 0.10.20
|
||||
AppVersionStr 0.10.20
|
||||
AlphaChannel 0
|
||||
BetaVersion 10020003
|
||||
BetaVersion 10020004
|
||||
|
|
Loading…
Add table
Reference in a new issue