mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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() {
|
void Widget::showControls() {
|
||||||
getStep()->show();
|
getStep()->show();
|
||||||
setupNextButton();
|
setupNextButton();
|
||||||
_next->show(anim::type::instant);
|
_next->toggle(_nextShown, anim::type::instant);
|
||||||
_nextShownAnimation.stop();
|
_nextShownAnimation.stop();
|
||||||
_connecting->setForceHidden(false);
|
_connecting->setForceHidden(false);
|
||||||
auto hasCover = getStep()->hasCover();
|
auto hasCover = getStep()->hasCover();
|
||||||
|
|
|
@ -253,7 +253,7 @@ MainWidget::MainWidget(
|
||||||
Core::App().floatPlayerClosed(
|
Core::App().floatPlayerClosed(
|
||||||
) | rpl::start_with_next([=](FullMsgId itemId) {
|
) | rpl::start_with_next([=](FullMsgId itemId) {
|
||||||
floatPlayerClosed(itemId);
|
floatPlayerClosed(itemId);
|
||||||
}, lifetime());
|
}, lifetime());
|
||||||
|
|
||||||
Core::App().exportManager().currentView(
|
Core::App().exportManager().currentView(
|
||||||
) | rpl::start_with_next([=](Export::View::PanelController *view) {
|
) | 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/application.h"
|
||||||
#include "core/core_settings.h"
|
#include "core/core_settings.h"
|
||||||
#include "main/main_session.h"
|
#include "main/main_session.h"
|
||||||
|
#include "main/main_account.h"
|
||||||
#include "facades.h"
|
#include "facades.h"
|
||||||
#include "app.h"
|
#include "app.h"
|
||||||
#include "styles/style_media_player.h"
|
#include "styles/style_media_player.h"
|
||||||
|
@ -70,6 +71,11 @@ Float::Float(
|
||||||
}
|
}
|
||||||
}, lifetime());
|
}, lifetime());
|
||||||
|
|
||||||
|
document->session().account().sessionChanges(
|
||||||
|
) | rpl::start_with_next([=] {
|
||||||
|
detach();
|
||||||
|
}, lifetime());
|
||||||
|
|
||||||
setCursor(style::cur_pointer);
|
setCursor(style::cur_pointer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -209,6 +209,8 @@ void Instance::setSession(not_null<Data*> data, Main::Session *session) {
|
||||||
setSession(data, nullptr);
|
setSession(data, nullptr);
|
||||||
}, data->sessionLifetime);
|
}, data->sessionLifetime);
|
||||||
} else {
|
} else {
|
||||||
|
stop(data->type);
|
||||||
|
_tracksFinishedNotifier.notify(data->type);
|
||||||
*data = Data(data->type, data->overview);
|
*data = Data(data->type, data->overview);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue