mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Move third column from HistoryWidget to MainWidget.
This commit is contained in:
@@ -56,12 +56,12 @@ void StickerSetBox::prepare() {
|
||||
onUpdateButtons();
|
||||
|
||||
connect(_inner, SIGNAL(updateButtons()), this, SLOT(onUpdateButtons()));
|
||||
connect(_inner, SIGNAL(installed(uint64)), this, SLOT(onInstalled(uint64)));
|
||||
}
|
||||
|
||||
void StickerSetBox::onInstalled(uint64 setId) {
|
||||
emit installed(setId);
|
||||
closeBox();
|
||||
_inner->setInstalled()
|
||||
| rpl::on_next([this](auto &&setId) {
|
||||
Auth().api().stickerSetInstalled(setId);
|
||||
closeBox();
|
||||
})
|
||||
| rpl::start(lifetime());
|
||||
}
|
||||
|
||||
void StickerSetBox::onAddStickers() {
|
||||
@@ -250,7 +250,7 @@ void StickerSetBox::Inner::installDone(const MTPmessages_StickerSetInstallResult
|
||||
Local::writeInstalledStickers();
|
||||
Auth().data().stickersUpdated().notify(true);
|
||||
}
|
||||
emit installed(_setId);
|
||||
_setInstalled.fire_copy(_setId);
|
||||
}
|
||||
|
||||
bool StickerSetBox::Inner::installFail(const RPCError &error) {
|
||||
|
@@ -35,9 +35,6 @@ class StickerSetBox : public BoxContent, public RPCSender {
|
||||
public:
|
||||
StickerSetBox(QWidget*, const MTPInputStickerSet &set);
|
||||
|
||||
signals:
|
||||
void installed(uint64 id);
|
||||
|
||||
protected:
|
||||
void prepare() override;
|
||||
|
||||
@@ -48,8 +45,6 @@ private slots:
|
||||
void onShareStickers();
|
||||
void onUpdateButtons();
|
||||
|
||||
void onInstalled(uint64 id);
|
||||
|
||||
private:
|
||||
void updateButtons();
|
||||
|
||||
@@ -74,6 +69,9 @@ public:
|
||||
QString shortName() const;
|
||||
|
||||
void install();
|
||||
rpl::producer<uint64> setInstalled() const {
|
||||
return _setInstalled.events();
|
||||
}
|
||||
|
||||
~Inner();
|
||||
|
||||
@@ -89,7 +87,6 @@ private slots:
|
||||
|
||||
signals:
|
||||
void updateButtons();
|
||||
void installed(uint64 id);
|
||||
|
||||
private:
|
||||
void updateSelected();
|
||||
@@ -127,4 +124,6 @@ private:
|
||||
QTimer _previewTimer;
|
||||
int _previewShown = -1;
|
||||
|
||||
rpl::event_stream<uint64> _setInstalled;
|
||||
|
||||
};
|
||||
|
@@ -1094,7 +1094,7 @@ void StickersBox::Inner::saveGroupSet() {
|
||||
auto newId = (_megagroupSetInput.type() == mtpc_inputStickerSetID) ? _megagroupSetInput.c_inputStickerSetID().vid.v : 0;
|
||||
if (newId != oldId) {
|
||||
Auth().api().setGroupStickerSet(_megagroupSet, _megagroupSetInput);
|
||||
App::main()->onStickersInstalled(Stickers::MegagroupSetId);
|
||||
Auth().api().stickerSetInstalled(Stickers::MegagroupSetId);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user