user-accounts: Fix missing records in the history dialog
"Session Ended" record may miss if "Session Started" isn't in the same week, which is caused by a wrong order of conditions. https://bugzilla.gnome.org/show_bug.cgi?id=762346
This commit is contained in:
parent
26993a314a
commit
83afdd39c8
1 changed files with 4 additions and 3 deletions
|
@ -234,9 +234,6 @@ show_week (UmHistoryDialog *um)
|
|||
line = 0;
|
||||
for (;i >= 0; i--) {
|
||||
history = g_array_index (login_history, UmLoginHistory, i);
|
||||
if (history.logout_time > 0 && history.logout_time < from) {
|
||||
break;
|
||||
}
|
||||
|
||||
/* Display only x-session and tty records */
|
||||
if (!g_str_has_prefix (history.type, ":") &&
|
||||
|
@ -244,6 +241,10 @@ show_week (UmHistoryDialog *um)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (history.logout_time > 0 && history.logout_time < from) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (history.logout_time > 0 && history.logout_time < to) {
|
||||
datetime = g_date_time_new_from_unix_local (history.logout_time);
|
||||
add_record (box, datetime, _("Session Ended"), line);
|
||||
|
|
Loading…
Add table
Reference in a new issue