2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Allow float video player across accounts.

This commit is contained in:
John Preston
2020-06-25 18:17:37 +04:00
parent 8171ed6c12
commit bf7aae5fc6
38 changed files with 257 additions and 176 deletions

View File

@@ -262,8 +262,10 @@ void MainWindow::setupIntro(Intro::EnterPoint point) {
auto animated = (_main || _passcodeLock);
auto bg = animated ? grabInner() : QPixmap();
destroyLayer();
auto created = object_ptr<Intro::Widget>(bodyWidget(), &account(), point);
clearWidgets();
_intro.create(bodyWidget(), &account(), point);
_intro = std::move(created);
if (_passcodeLock) {
_intro->hide();
} else {
@@ -284,6 +286,7 @@ void MainWindow::setupMain() {
auto animated = (_intro || _passcodeLock);
auto bg = animated ? grabInner() : QPixmap();
destroyLayer();
auto created = object_ptr<MainWidget>(bodyWidget(), sessionController());
clearWidgets();
_main = std::move(created);
@@ -711,12 +714,6 @@ void MainWindow::activate() {
}
}
void MainWindow::noIntro(Intro::Widget *was) {
if (was == _intro) {
_intro = nullptr;
}
}
bool MainWindow::takeThirdSectionFromLayer() {
return _layer ? _layer->takeToThirdSection() : false;
}