user-accounts: Prevent crashes if current user is not in carousel
In a specific cases, current user doesn't have to be returned from accountsservice, or can be skipped by act_user_is_system_account check. System users should not be shown. This is expected for root account, but should not happen with regular user accounts. It needs to be fixed in accountsservice if you see this happening with regular user accounts. We have to be just sure that Users panel doesn't crash in such cases and show all non-system user accounts returned from accountsservice. Empty page is shown currently only if act_user_manager_list_users returns nothing, but it has to be also shown if only system accounts are returned. To fix this issue, do not try to show current user, but show first user account in carousel instead if there is any. First user account is current user in normal case. The patch also fixes problems that current user account is sometimes selected instead of currently selected user account. This is because of preselection of first item in um_carousel_add, which causes unwanted signal emissions... https://bugzilla.gnome.org/show_bug.cgi?id=773673
parent
a701b464
Please register or sign in to comment