<table><tr><td style="">ngraham created this revision.<br />ngraham added reviewers: mart, Plasma.<br />Herald added a project: Plasma.<br />Herald added a subscriber: plasma-devel.<br />ngraham requested review of this revision.
</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/D23279">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>The code clearly intended for the <span><span class="phui-tag-view phui-tag-type-shade phui-tag-grey phui-tag-shade "><span class="phui-tag-core ">Switch User</span></span></span> button to only be visible when there<br />
was more than one session, but a subtle bug prevented this from working: the fake "new<br />
session" session that's added to the model increases its size by one, making the<br />
conditional always true.</p>
<p>This patch fixes the bug by testing against a number appropriate for whether or not<br />
the fake "new session" session exists, since it's configurable.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>No more <span><span class="phui-tag-view phui-tag-type-shade phui-tag-grey phui-tag-shade "><span class="phui-tag-core ">Switch User</span></span></span> button on the login screen unless there are multiple sessions</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R120 Plasma Workspace</div></div></div><br /><div><strong>BRANCH</strong><div><div>only-show-switch-user-button-when-more-than-one-session-is-active (branched from master)</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D23279">https://phabricator.kde.org/D23279</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>lookandfeel/contents/lockscreen/LockScreenUi.qml</div></div></div><br /><div><strong>To: </strong>ngraham, mart, Plasma<br /><strong>Cc: </strong>plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, fbampaloukas, GB_2, ragreen, Pitel, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart<br /></div>