Beta 10008001: moved all Notify::Observer-s to base::Subscriber-s.

This commit is contained in:
John Preston
2016-09-26 21:33:34 +03:00
parent 18f3e45657
commit da49d8440a
26 changed files with 47 additions and 398 deletions
@@ -32,7 +32,7 @@ class WidgetSlideWrap;
namespace Settings {
class BlockWidget : public ScrolledWidget, public Notify::Observer, protected base::Subscriber {
class BlockWidget : public ScrolledWidget, protected base::Subscriber {
Q_OBJECT
public:
@@ -57,10 +57,9 @@ CoverWidget::CoverWidget(QWidget *parent, UserData *self) : BlockWidget(parent,
connect(_editNameInline, SIGNAL(clicked()), this, SLOT(onEditName()));
auto observeEvents = Notify::PeerUpdate::Flag::NameChanged;
Notify::registerPeerObserver(observeEvents, this, [this](const Notify::PeerUpdate &update) {
subscribe(Notify::PeerUpdated(), Notify::PeerUpdatedHandler(observeEvents, [this](const Notify::PeerUpdate &update) {
notifyPeerUpdated(update);
});
}));
subscribe(FileDialog::QueryDone(), [this](const FileDialog::QueryUpdate &update) {
notifyFileQueryUpdated(update);
});