mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +00:00
Fix playing music from a different account.
This commit is contained in:
@@ -251,11 +251,6 @@ MainWidget::MainWidget(
|
||||
connect(_dialogs, SIGNAL(cancelled()), this, SLOT(dialogsCancelled()));
|
||||
connect(_history, &HistoryWidget::cancelled, [=] { handleHistoryBack(); });
|
||||
|
||||
Media::Player::instance()->updatedNotifier(
|
||||
) | rpl::start_with_next([=](const Media::Player::TrackState &state) {
|
||||
handleAudioUpdate(state);
|
||||
}, lifetime());
|
||||
|
||||
subscribe(session().calls().currentCallChanged(), [=](Calls::Call *call) {
|
||||
setCurrentCall(call);
|
||||
});
|
||||
@@ -268,6 +263,16 @@ MainWidget::MainWidget(
|
||||
_exportTopBar->finishAnimating();
|
||||
}
|
||||
|
||||
Media::Player::instance()->updatedNotifier(
|
||||
) | rpl::start_with_next([=](const Media::Player::TrackState &state) {
|
||||
handleAudioUpdate(state);
|
||||
}, lifetime());
|
||||
handleAudioUpdate(Media::Player::instance()->getState(AudioMsgId::Type::Song));
|
||||
handleAudioUpdate(Media::Player::instance()->getState(AudioMsgId::Type::Voice));
|
||||
if (_player) {
|
||||
_player->finishAnimating();
|
||||
}
|
||||
|
||||
subscribe(_controller->dialogsListFocused(), [this](bool) {
|
||||
updateDialogsWidthAnimated();
|
||||
});
|
||||
|
Reference in New Issue
Block a user