Closed beta 10020004: stickers box fixed, manage admins box fixed.

This commit is contained in:
John Preston 2016-12-22 16:30:27 +03:00
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

View file

@ -34,8 +34,8 @@ IDI_ICON1 ICON "..\\art\\icon256.ico"
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,10,20,3 FILEVERSION 0,10,20,4
PRODUCTVERSION 0,10,20,3 PRODUCTVERSION 0,10,20,4
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.20.3" VALUE "FileVersion", "0.10.20.4"
VALUE "LegalCopyright", "Copyright (C) 2014-2016" VALUE "LegalCopyright", "Copyright (C) 2014-2016"
VALUE "ProductName", "Telegram Desktop" VALUE "ProductName", "Telegram Desktop"
VALUE "ProductVersion", "0.10.20.3" VALUE "ProductVersion", "0.10.20.4"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"

View file

@ -25,8 +25,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,10,20,3 FILEVERSION 0,10,20,4
PRODUCTVERSION 0,10,20,3 PRODUCTVERSION 0,10,20,4
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.20.3" VALUE "FileVersion", "0.10.20.4"
VALUE "LegalCopyright", "Copyright (C) 2014-2016" VALUE "LegalCopyright", "Copyright (C) 2014-2016"
VALUE "ProductName", "Telegram Desktop" VALUE "ProductName", "Telegram Desktop"
VALUE "ProductVersion", "0.10.20.3" VALUE "ProductVersion", "0.10.20.4"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"

View file

@ -48,17 +48,19 @@ void BoxContent::setInner(object_ptr<TWidget> inner) {
void BoxContent::setInner(object_ptr<TWidget> inner, const style::ScrollArea &st) { void BoxContent::setInner(object_ptr<TWidget> inner, const style::ScrollArea &st) {
if (inner) { if (inner) {
getDelegate()->setLayerType(true); getDelegate()->setLayerType(true);
if (!_scroll) { _scroll.create(this, st);
_scroll.create(this, st); _scroll->setGeometryToLeft(0, _innerTopSkip, width(), 0);
connect(_scroll, SIGNAL(scrolled()), this, SLOT(onScroll())); _scroll->setOwnedWidget(std_::move(inner));
connect(_scroll, SIGNAL(innerResized()), this, SLOT(onInnerResize())); if (_topShadow) {
_topShadow->raise();
_bottomShadow->raise();
} else {
_topShadow.create(this, object_ptr<BoxLayerTitleShadow>(this)); _topShadow.create(this, object_ptr<BoxLayerTitleShadow>(this));
_bottomShadow.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(); updateScrollAreaGeometry();
connect(_scroll, SIGNAL(scrolled()), this, SLOT(onScroll()));
connect(_scroll, SIGNAL(innerResized()), this, SLOT(onInnerResize()));
} else { } else {
getDelegate()->setLayerType(false); getDelegate()->setLayerType(false);
_scroll.destroyDelayed(); _scroll.destroyDelayed();

View file

@ -39,8 +39,8 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
namespace { namespace {
constexpr int kArchivedLimitFirstRequest = 1;// 10; constexpr int kArchivedLimitFirstRequest = 10;
constexpr int kArchivedLimitPerPage = 1;// 30; constexpr int kArchivedLimitPerPage = 30;
} // namespace } // namespace
@ -401,6 +401,7 @@ void StickersBox::switchTab() {
_tab = newTab; _tab = newTab;
_section = newSection; _section = newSection;
setInnerWidget(_tab->takeWidget(), getTopSkip()); setInnerWidget(_tab->takeWidget(), getTopSkip());
_tabs->raise();
_tab->widget()->show(); _tab->widget()->show();
rebuildList(); rebuildList();
onScrollToY(_tab->getScrollTop()); onScrollToY(_tab->getScrollTop());
@ -449,8 +450,6 @@ void StickersBox::installSet(uint64 setId) {
void StickersBox::installDone(const MTPmessages_StickerSetInstallResult &result) { void StickersBox::installDone(const MTPmessages_StickerSetInstallResult &result) {
if (result.type() == mtpc_messages_stickerSetInstallResultArchive) { if (result.type() == mtpc_messages_stickerSetInstallResultArchive) {
Stickers::applyArchivedResult(result.c_messages_stickerSetInstallResultArchive()); Stickers::applyArchivedResult(result.c_messages_stickerSetInstallResultArchive());
} else {
Stickers::applyArchivedResultFake();
} }
} }
@ -520,22 +519,28 @@ void StickersBox::onStickersUpdated() {
} }
} }
void StickersBox::rebuildList() { void StickersBox::rebuildList(Tab *tab) {
if (_tab == &_installed) { if (!tab) tab = _tab;
_localOrder = _tab->widget()->getFullOrder();
_localRemoved = _tab->widget()->getRemovedSets(); if (tab == &_installed) {
_localOrder = tab->widget()->getFullOrder();
_localRemoved = tab->widget()->getRemovedSets();
} }
_tab->widget()->rebuild(); tab->widget()->rebuild();
if (_tab == &_installed) { if (tab == &_installed) {
_tab->widget()->setFullOrder(_localOrder); tab->widget()->setFullOrder(_localOrder);
} }
_tab->widget()->setRemovedSets(_localRemoved); tab->widget()->setRemovedSets(_localRemoved);
} }
void StickersBox::closeHook() { void StickersBox::closeHook() {
if (!_installed.widget()) { if (!_installed.widget()) {
return; return;
} }
// Make sure that our changes in other tabs are applied in the Installed tab.
rebuildList(&_installed);
if (_someArchivedLoaded) { if (_someArchivedLoaded) {
Local::writeArchivedStickers(); Local::writeArchivedStickers();
} }

View file

@ -62,31 +62,6 @@ private slots:
void onStickersUpdated(); void onStickersUpdated();
private: 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 Inner;
class Tab { class Tab {
public: public:
@ -117,6 +92,32 @@ private:
int _scrollTop = 0; 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 _installed;
Tab _featured; Tab _featured;
Tab _archived; Tab _archived;

View file

@ -22,7 +22,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
#include "core/utils.h" #include "core/utils.h"
#define BETA_VERSION_MACRO (10020003ULL) #define BETA_VERSION_MACRO (10020004ULL)
constexpr int AppVersion = 10020; constexpr int AppVersion = 10020;
constexpr str_const AppVersionStr = "0.10.20"; constexpr str_const AppVersionStr = "0.10.20";

View file

@ -677,11 +677,11 @@ defaultSettingsSlider: SettingsSlider {
} }
defaultTabsSlider: SettingsSlider(defaultSettingsSlider) { defaultTabsSlider: SettingsSlider(defaultSettingsSlider) {
height: 49px; height: 53px;
barTop: 46px; barTop: 50px;
barSkip: 0px; barSkip: 0px;
barFg: transparent; barFg: transparent;
labelTop: 16px; labelTop: 19px;
labelFont: semiboldFont; labelFont: semiboldFont;
labelFg: windowSubTextFg; labelFg: windowSubTextFg;
labelFgActive: lightButtonFg; labelFgActive: lightButtonFg;

View file

@ -3,4 +3,4 @@ AppVersionStrMajor 0.10
AppVersionStrSmall 0.10.20 AppVersionStrSmall 0.10.20
AppVersionStr 0.10.20 AppVersionStr 0.10.20
AlphaChannel 0 AlphaChannel 0
BetaVersion 10020003 BetaVersion 10020004