mirror of
https://github.com/moparisthebest/k-9
synced 2025-02-17 07:30:16 -05:00
Sort the "NONE" folder to the top of the auto-expand folder list
This commit is contained in:
parent
393519d352
commit
6daeb6b749
@ -228,7 +228,7 @@ public class ChooseFolder extends K9ListActivity
|
|||||||
localFolders.add(folder.getName());
|
localFolders.add(folder.getName());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (showOptionNone)
|
if (showOptionNone)
|
||||||
{
|
{
|
||||||
localFolders.add(Email.FOLDER_NONE);
|
localFolders.add(Email.FOLDER_NONE);
|
||||||
@ -237,6 +237,14 @@ public class ChooseFolder extends K9ListActivity
|
|||||||
Collections.sort(localFolders, new Comparator<String>() {
|
Collections.sort(localFolders, new Comparator<String>() {
|
||||||
public int compare(String aName, String bName)
|
public int compare(String aName, String bName)
|
||||||
{
|
{
|
||||||
|
if (Email.FOLDER_NONE.equalsIgnoreCase(aName))
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
if (Email.FOLDER_NONE.equalsIgnoreCase(bName))
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
if (Email.INBOX.equalsIgnoreCase(aName))
|
if (Email.INBOX.equalsIgnoreCase(aName))
|
||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
@ -245,14 +253,6 @@ public class ChooseFolder extends K9ListActivity
|
|||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if (Email.FOLDER_NONE.equalsIgnoreCase(aName))
|
|
||||||
{
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
if (Email.FOLDER_NONE.equalsIgnoreCase(bName))
|
|
||||||
{
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return aName.compareToIgnoreCase(bName);
|
return aName.compareToIgnoreCase(bName);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user