2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Update audio player icons.

This commit is contained in:
John Preston
2021-11-24 16:23:10 +04:00
parent aef37be3d0
commit ca61b80fe5
74 changed files with 185 additions and 163 deletions

View File

@@ -497,6 +497,7 @@ bool Instance::moveInPlaylist(
const auto jumpById = [&](FullMsgId id) {
return jumpByItem(data->history->owner().message(id));
};
const auto repeatAll = (repeat(data) == RepeatMode::All);
if (order(data) == OrderMode::Shuffle) {
const auto raw = data->shuffleData.get();
@@ -516,7 +517,7 @@ bool Instance::moveInPlaylist(
raw->nonPlayedIds.erase(i);
}
}
if (repeat(data) == RepeatMode::All) {
if (repeatAll) {
ensureShuffleMove(data, delta);
}
if (raw->nonPlayedIds.empty()
@@ -544,7 +545,8 @@ bool Instance::moveInPlaylist(
const auto newIndex = *data->playlistIndex
+ (order(data) == OrderMode::Reverse ? -delta : delta);
const auto useIndex = (!data->playlistSlice
const auto useIndex = (!repeatAll
|| !data->playlistSlice
|| data->playlistSlice->skippedAfter() != 0
|| data->playlistSlice->skippedBefore() != 0
|| !data->playlistSlice->size())
@@ -553,7 +555,7 @@ bool Instance::moveInPlaylist(
% int(data->playlistSlice->size()));
if (const auto item = itemByIndex(data, useIndex)) {
return jumpByItem(item);
} else if (repeat(data) == RepeatMode::All
} else if (repeatAll
&& data->playlistOtherSlice
&& data->playlistOtherSlice->size() > 0) {
const auto &other = *data->playlistOtherSlice;