mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-19 15:47:11 +02:00
Fix player closing on logout.
This commit is contained in:
parent
bf7aae5fc6
commit
2b5d3b022d
4 changed files with 10 additions and 2 deletions
|
@ -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();
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue