2
0
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:
John Preston
2016-06-30 15:03:32 +03:00
parent d64892584d
commit 7ca5737bc0
13 changed files with 395 additions and 635 deletions

View File

@@ -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());
}