Fix player closing on logout.

This commit is contained in:
John Preston 2020-06-25 19:01:10 +04:00
parent bf7aae5fc6
commit 2b5d3b022d
4 changed files with 10 additions and 2 deletions

View file

@ -587,7 +587,7 @@ void Widget::showTerms(Fn<void()> callback) {
void Widget::showControls() {
getStep()->show();
setupNextButton();
_next->show(anim::type::instant);
_next->toggle(_nextShown, anim::type::instant);
_nextShownAnimation.stop();
_connecting->setForceHidden(false);
auto hasCover = getStep()->hasCover();

View file

@ -253,7 +253,7 @@ MainWidget::MainWidget(
Core::App().floatPlayerClosed(
) | rpl::start_with_next([=](FullMsgId itemId) {
floatPlayerClosed(itemId);
}, lifetime());
}, lifetime());
Core::App().exportManager().currentView(
) | rpl::start_with_next([=](Export::View::PanelController *view) {

View file

@ -24,6 +24,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "core/application.h"
#include "core/core_settings.h"
#include "main/main_session.h"
#include "main/main_account.h"
#include "facades.h"
#include "app.h"
#include "styles/style_media_player.h"
@ -70,6 +71,11 @@ Float::Float(
}
}, lifetime());
document->session().account().sessionChanges(
) | rpl::start_with_next([=] {
detach();
}, lifetime());
setCursor(style::cur_pointer);
}

View file

@ -209,6 +209,8 @@ void Instance::setSession(not_null<Data*> data, Main::Session *session) {
setSession(data, nullptr);
}, data->sessionLifetime);
} else {
stop(data->type);
_tracksFinishedNotifier.notify(data->type);
*data = Data(data->type, data->overview);
}
}