mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +00:00
Add manage supergroup / channel box.
This commit is contained in:
@@ -271,7 +271,7 @@ MainWidget::MainWidget(
|
||||
});
|
||||
|
||||
using namespace rpl::mappers;
|
||||
_controller->historyPeer.value()
|
||||
_controller->activePeer.value()
|
||||
| rpl::map([](PeerData *peer) {
|
||||
auto canWrite = peer
|
||||
? Data::CanWriteValue(peer)
|
||||
@@ -2432,7 +2432,7 @@ void MainWidget::ui_showPeerHistory(
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (auto historyPeer = _history->peer()) {
|
||||
if (auto historyPeer = _controller->historyPeer.current()) {
|
||||
if (way == Way::Forward && historyPeer->id == peerId) {
|
||||
way = Way::ClearStack;
|
||||
}
|
||||
@@ -2552,6 +2552,10 @@ void MainWidget::ui_showPeerHistory(
|
||||
_dialogs->update();
|
||||
}
|
||||
|
||||
if (!peerId) {
|
||||
_controller->activePeer = nullptr;
|
||||
}
|
||||
|
||||
checkFloatPlayerVisibility();
|
||||
}
|
||||
|
||||
@@ -2577,10 +2581,6 @@ void MainWidget::peerAfter(const PeerData *inPeer, MsgId inMsg, PeerData *&outPe
|
||||
_dialogs->peerAfter(inPeer, inMsg, outPeer, outMsg);
|
||||
}
|
||||
|
||||
PeerData *MainWidget::historyPeer() {
|
||||
return _history->peer();
|
||||
}
|
||||
|
||||
PeerData *MainWidget::peer() {
|
||||
return _overview ? _overview->peer() : _history->peer();
|
||||
}
|
||||
@@ -2962,6 +2962,10 @@ void MainWidget::showNewSection(
|
||||
settingSection->showFast();
|
||||
}
|
||||
|
||||
if (settingSection.data() == _mainSection.data()) {
|
||||
_controller->activePeer = _mainSection->activePeer();
|
||||
}
|
||||
|
||||
checkFloatPlayerVisibility();
|
||||
orderWidgets();
|
||||
}
|
||||
@@ -3530,8 +3534,11 @@ void MainWidget::updateThirdColumnToCurrentPeer(
|
||||
} else {
|
||||
Auth().data().setTabbedReplacedWithInfo(false);
|
||||
if (!peer) {
|
||||
_thirdSection.destroy();
|
||||
_thirdShadow.destroy();
|
||||
if (_thirdSection) {
|
||||
_thirdSection.destroy();
|
||||
_thirdShadow.destroy();
|
||||
updateControlsGeometry();
|
||||
}
|
||||
} else if (Adaptive::ThreeColumn()
|
||||
&& Auth().data().thirdSectionInfoEnabled()) {
|
||||
switchInfoFast();
|
||||
|
Reference in New Issue
Block a user