2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-01 23:25:15 +00:00

Added waiting for full data update of peer to open EditPeerInfoBox.

This commit is contained in:
23rd
2019-03-17 11:14:31 +03:00
committed by John Preston
parent cb272be805
commit 21e417433b
2 changed files with 20 additions and 1 deletions

View File

@@ -7,6 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#include "window/window_controller.h"
#include "boxes/peers/edit_peer_info_box.h"
#include "window/main_window.h"
#include "info/info_memento.h"
#include "info/info_controller.h"
@@ -100,6 +101,18 @@ Controller::Controller(
: Navigation(session)
, _window(window) {
init();
subscribe(Auth().api().fullPeerUpdated(), [=](PeerData *peer) {
if (peer == _showEditPeer) {
_showEditPeer = nullptr;
Ui::show(Box<EditPeerInfoBox>(peer));
}
});
}
void Controller::showEditPeerBox(PeerData *peer) {
_showEditPeer = peer;
Auth().api().requestFullPeer(peer);
}
void Controller::init() {