Fixes #6321 Changes from code review (accidentally omittied from original commit)
This commit is contained in:
parent
b83fb8f00c
commit
9b9315f60e
3 changed files with 4 additions and 4 deletions
|
|
@ -53,7 +53,7 @@ public class AccountDialogAccountListPane : AccountDialogPane {
|
|||
}
|
||||
|
||||
// Sort accounts and add them to the UI.
|
||||
account_list.sort((CompareFunc) Geary.AccountInformation.compare);
|
||||
account_list.sort((CompareFunc) Geary.AccountInformation.compare_ascending);
|
||||
foreach (Geary.AccountInformation account in account_list)
|
||||
on_account_added(account);
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ public class FolderList.InboxesBranch : Sidebar.Branch {
|
|||
|
||||
InboxFolderEntry entry_a = (InboxFolderEntry) a;
|
||||
InboxFolderEntry entry_b = (InboxFolderEntry) b;
|
||||
return Geary.AccountInformation.compare(entry_a.get_account_information(),
|
||||
return Geary.AccountInformation.compare_ascending(entry_a.get_account_information(),
|
||||
entry_b.get_account_information());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -450,8 +450,8 @@ public class Geary.AccountInformation : Object {
|
|||
return new RFC822.MailboxAddress(real_name, email);
|
||||
}
|
||||
|
||||
public static int compare(AccountInformation a, AccountInformation b) {
|
||||
int diff = (int) (a.ordinal > b.ordinal) - (int) (a.ordinal < b.ordinal);
|
||||
public static int compare_ascending(AccountInformation a, AccountInformation b) {
|
||||
int diff = a.ordinal - b.ordinal;
|
||||
if (diff != 0)
|
||||
return diff;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue