mirror of
https://github.com/danog/telegram-tt.git
synced 2025-01-22 05:11:55 +01:00
Audio Player: Fix sudden playing after disconnect
This commit is contained in:
parent
11cb73be5e
commit
af40465e14
@ -23,7 +23,7 @@ import {
|
|||||||
replaceThreadParam,
|
replaceThreadParam,
|
||||||
} from '../../reducers';
|
} from '../../reducers';
|
||||||
import {
|
import {
|
||||||
selectUser, selectChat, selectCurrentMessageList, selectDraft,
|
selectUser, selectChat, selectCurrentMessageList, selectDraft, selectChatMessage,
|
||||||
} from '../../selectors';
|
} from '../../selectors';
|
||||||
import { isChatPrivate } from '../../helpers';
|
import { isChatPrivate } from '../../helpers';
|
||||||
|
|
||||||
@ -254,6 +254,11 @@ async function loadAndReplaceMessages(savedUsers?: ApiUser[]) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setGlobal(global);
|
setGlobal(global);
|
||||||
|
|
||||||
|
const { chatId: audioChatId, messageId: audioMessageId } = global.audioPlayer;
|
||||||
|
if (audioChatId && audioMessageId && !selectChatMessage(global, audioChatId, audioMessageId)) {
|
||||||
|
getDispatch().closeAudioPlayer();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function loadAndUpdateUsers() {
|
async function loadAndUpdateUsers() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user