<table><tr><td style="">jnicolay created this revision.<br />jnicolay added a reviewer: Plasma.<br />jnicolay set the repository for this revision to rKDEPLASMAADDONS Plasma Addons.<br />Restricted Application added a project: Plasma.<br />Restricted Application added a subscriber: plasma-devel.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D2839" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>On startup the media frame will always start with the same image, even if random is selected.</p>

<p>The reason is that the images are added to the list of items one by one and if no item is currently showing one will be picked as soon as it's available. In that case, always the first one that's discovered.</p>

<p>The fix skips to the next (now random) item after loading is done when set to random.</p></div></div><br /><div><strong>TEST PLAN</strong><div><ol class="remarkup-list">
<li class="remarkup-list-item">put media frame on desktop</li>
<li class="remarkup-list-item">add several images</li>
<li class="remarkup-list-item">set to random</li>
<li class="remarkup-list-item">restart plasma several times (killall plasmashell && kstart5 plasmashell)</li>
<li class="remarkup-list-item">without patch: the media frame will always start with the same image</li>
<li class="remarkup-list-item">with patch: a random image is choosen on every start</li>
</ol></div></div><br /><div><strong>REPOSITORY</strong><div><div>rKDEPLASMAADDONS Plasma Addons</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D2839" rel="noreferrer">https://phabricator.kde.org/D2839</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>applets/mediaframe/package/contents/ui/main.qml</div></div></div><br /><div><strong>EMAIL PREFERENCES</strong><div><a href="https://phabricator.kde.org/settings/panel/emailpreferences/" rel="noreferrer">https://phabricator.kde.org/settings/panel/emailpreferences/</a></div></div><br /><div><strong>To: </strong>jnicolay, Plasma<br /><strong>Cc: </strong>plasma-devel, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas<br /></div>