]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/model/MobileLedgerProfile.java
delete profile menu as action; hide when only one profile or when a new profile is...
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / model / MobileLedgerProfile.java
index 96fa9b215e88fc1727c2437fe0a213bf77ebf141..bbcf57fa7696041816c31d705d16996bc7b70ee1 100644 (file)
@@ -56,10 +56,11 @@ public final class MobileLedgerProfile {
         List<MobileLedgerProfile> result = new ArrayList<>();
         SQLiteDatabase db = MLDB.getReadableDatabase();
         try (Cursor cursor = db.rawQuery("SELECT uuid, name, url, use_authentication, auth_user, " +
-                                         "auth_password FROM profiles", null))
+                                         "auth_password FROM profiles order by order_no", null))
         {
             while (cursor.moveToNext()) {
-                result.add(new MobileLedgerProfile(cursor.getString(0), cursor.getString(1), cursor.getString(2), cursor.getInt(3) == 1, cursor.getString(4),
+                result.add(new MobileLedgerProfile(cursor.getString(0), cursor.getString(1),
+                        cursor.getString(2), cursor.getInt(3) == 1, cursor.getString(4),
                         cursor.getString(5)));
             }
         }