mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-05 09:05:14 +00:00
Removed SongMsgId, unified working with voice/music files in audio.
This commit is contained in:
@@ -2091,11 +2091,11 @@ int32 OverviewWidget::lastScrollTop() const {
|
||||
|
||||
int32 OverviewWidget::countBestScroll() const {
|
||||
if (type() == OverviewMusicFiles && audioPlayer()) {
|
||||
SongMsgId playing;
|
||||
AudioMsgId playing;
|
||||
AudioPlayerState playingState = AudioPlayerStopped;
|
||||
audioPlayer()->currentState(&playing, &playingState);
|
||||
audioPlayer()->currentState(&playing, AudioMsgId::Type::Song, &playingState);
|
||||
if (playing) {
|
||||
int32 top = _inner.itemTop(playing.contextId);
|
||||
int32 top = _inner.itemTop(playing.contextId());
|
||||
if (top >= 0) {
|
||||
return snap(top - int(_scroll.height() - (st::msgPadding.top() + st::mediaThumbSize + st::msgPadding.bottom())) / 2, 0, _scroll.scrollTopMax());
|
||||
}
|
||||
|
Reference in New Issue
Block a user