[wallpapers/image] Randomise new batches of images in the slideshow
ClosedPublic

Authored by davidedmundson on Oct 27 2019, 4:09 PM.

Details

Summary

There was a concious decision that when we add a new wallpaper we should
append to the existing random order collection, rather than shuffle
existing ones.

The logic is fine but if we start with 0 wallpapers and then add 20 new
ones we don't shuffle anything.

This patch changes it so when a new batch of N wallpapers is added,
those N are shuffled when appending to the existing sort order.

BUG: 413463
FIXED-IN: 5.17.2

Test Plan

qDebug + ran a few times

Diff Detail

Repository
R120 Plasma Workspace
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
davidedmundson created this revision.Oct 27 2019, 4:09 PM
Restricted Application added a project: Plasma. · View Herald TranscriptOct 27 2019, 4:09 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
davidedmundson requested review of this revision.Oct 27 2019, 4:09 PM
ngraham accepted this revision.Oct 27 2019, 5:09 PM
This revision is now accepted and ready to land.Oct 27 2019, 5:09 PM

To clarify my comment refers to

The logic is fine but if we start with 0 wallpapers and then add 20 newones we don't shuffle anything.

For the other cases shuffling the added images is probably the right thing

davidre accepted this revision.Oct 29 2019, 6:02 PM
This revision was automatically updated to reflect the committed changes.

Landed this on the 5.17 branch just now to make sure it gets in for Plasma 5.17.2.