sort: fix autoscroll when sort is descending

This commit is contained in:
Kaian 2016-02-22 11:42:34 +01:00
parent 420fa60da9
commit 69aa24e3e2

View File

@ -308,7 +308,12 @@ call_list_draw_list(ui_t *ui)
// If autoscroll is enabled, select the last dialog
if (info->autoscroll) {
call_list_move(ui, vector_count(info->dcalls) - 1);
sip_sort_t sort = sip_sort_options();
if (sort.asc) {
call_list_move(ui, vector_count(info->dcalls) - 1);
} else {
call_list_move(ui, 0);
}
} else if (call) {
call_list_move(ui, vector_index(info->dcalls, call));
}