]> git.ktnx.net Git - mobile-ledger.git/commitdiff
more debug (disabled)
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Thu, 7 Mar 2019 05:00:33 +0000 (07:00 +0200)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Thu, 7 Mar 2019 05:00:33 +0000 (07:00 +0200)
app/src/main/java/net/ktnx/mobileledger/async/UpdateAccountsTask.java
app/src/main/java/net/ktnx/mobileledger/model/MobileLedgerProfile.java

index 64a5559a5ccefa1179b69f19ee0209b2489fdb2c..8d17a548d447cd8d21ff81e7818a09755e4c71d9 100644 (file)
@@ -43,7 +43,10 @@ public class UpdateAccountsTask extends AsyncTask<Void, Void, ArrayList<LedgerAc
             SQLiteDatabase db = MLDB.getReadableDatabase();
             try (Cursor cursor = db.rawQuery(sql, new String[]{profileUUID})) {
                 while (cursor.moveToNext()) {
-                    LedgerAccount acc = new LedgerAccount(cursor.getString(0));
+                    final String accName = cursor.getString(0);
+//                    Log.d("accounts",
+//                            String.format("Read account '%s' from DB [%s]", accName, profileUUID));
+                    LedgerAccount acc = new LedgerAccount(accName);
                     acc.setHidden(cursor.getInt(1) == 1);
                     try (Cursor c2 = db.rawQuery(
                             "SELECT value, currency FROM account_values WHERE profile = ? " +
index ab4d70105fdee8c842a5bf4f771253b4511b93c2..ec204d9a47272042ba3b15b5815fb0e9aba7eeaa 100644 (file)
@@ -192,6 +192,7 @@ public final class MobileLedgerProfile {
                 new Object[]{uuid, acc.getName(), acc.getName().toUpperCase(), acc.getParentName(),
                              acc.getLevel()
                 });
+//        Log.d("accounts", String.format("Stored account '%s' in DB [%s]", acc.getName(), uuid));
     }
     public void storeAccountValue(SQLiteDatabase db, String name, String currency, Float amount) {
         db.execSQL("replace into account_values(profile, account, " +