valeriymalov added a comment.
> We have addAccountToCache which has an argument pos, which determines if we're adding or replacing. I've actually removed this bit, addAccountToCache now only adds accounts (either inserts at pos or appends) Though I agree that current code is probably a bit fragile, maybe the model can be changed the way there's no need in manual ordering or at least storing "fake user". If that seems like a better approach I can look into that. REPOSITORY R128 User Manager REVISION DETAIL https://phabricator.kde.org/D12837 To: valeriymalov, #plasma, davidedmundson Cc: davidedmundson, ngraham, rdieter, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart