]> git.ktnx.net Git - mobile-ledger.git/commitdiff
whitespace
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Wed, 13 May 2020 18:42:47 +0000 (21:42 +0300)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Thu, 14 May 2020 17:39:53 +0000 (17:39 +0000)
app/src/main/java/net/ktnx/mobileledger/model/LedgerTransaction.java
app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionItemHolder.java
app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionModel.java

index afb9c57f01bdc3298f942b99a73180029e1fa5e2..cdf2068aac46214df78d7fad234467f1b340a140 100644 (file)
@@ -180,9 +180,9 @@ public class LedgerTransaction {
                 }
                 description = cTr.getString(1);
 
-                try (Cursor cAcc = db.rawQuery("SELECT account_name, amount, currency, comment FROM " +
-                                               "transaction_accounts WHERE " +
-                                               "profile=? AND transaction_id = ?",
+                try (Cursor cAcc = db.rawQuery(
+                        "SELECT account_name, amount, currency, comment FROM " +
+                        "transaction_accounts WHERE profile=? AND transaction_id = ?",
                         new String[]{profile, String.valueOf(id)}))
                 {
                     while (cAcc.moveToNext()) {
index 84d744b558238bb5f502b0ab6211f7fdc53f6f72..3e6cab36328f7079e569f4efaad78de619de16aa 100644 (file)
@@ -169,7 +169,7 @@ class NewTransactionItemHolder extends RecyclerView.ViewHolder
             if (id == R.id.comment) {
                 commentFocusChanged(commentLayout, tvComment, hasFocus);
             }
-            else if ( id == R.id.transaction_comment) {
+            else if (id == R.id.transaction_comment) {
                 commentFocusChanged(transactionCommentLayout, tvTransactionComment, hasFocus);
             }
         };
index 7fd177683f461db1be543200007585a74dec4efb..f5568081c6a88ba98e74f2a142c9864655a68334 100644 (file)
@@ -49,17 +49,17 @@ public class NewTransactionModel extends ViewModel {
     final MutableLiveData<Boolean> showCurrency = new MutableLiveData<>(false);
     final ArrayList<Item> items = new ArrayList<>();
     final MutableLiveData<Boolean> isSubmittable = new MutableLiveData<>(false);
+    final MutableLiveData<Boolean> showComments = new MutableLiveData<>(true);
     private final Item header = new Item(this, null, "");
     private final Item trailer = new Item(this);
     private final MutableLiveData<Integer> focusedItem = new MutableLiveData<>(0);
     private final MutableLiveData<Integer> accountCount = new MutableLiveData<>(0);
     private final MutableLiveData<Boolean> simulateSave = new MutableLiveData<>(false);
+    private final AtomicInteger busyCounter = new AtomicInteger(0);
+    private final MutableLiveData<Boolean> busyFlag = new MutableLiveData<>(false);
     private boolean observingDataProfile;
     private Observer<MobileLedgerProfile> profileObserver =
             profile -> showCurrency.postValue(profile.getShowCommodityByDefault());
-    private final AtomicInteger busyCounter = new AtomicInteger(0);
-    private final MutableLiveData<Boolean> busyFlag = new MutableLiveData<>(false);
-    final MutableLiveData<Boolean> showComments = new MutableLiveData<>(false);
     void observeShowComments(LifecycleOwner owner, Observer<? super Boolean> observer) {
         showComments.observe(owner, observer);
     }
@@ -206,11 +206,13 @@ public class NewTransactionModel extends ViewModel {
     }
     void incrementBusyCounter() {
         int newValue = busyCounter.incrementAndGet();
-        if (newValue == 1) busyFlag.postValue(true);
+        if (newValue == 1)
+            busyFlag.postValue(true);
     }
     void decrementBusyCounter() {
         int newValue = busyCounter.decrementAndGet();
-        if (newValue == 0) busyFlag.postValue(false);
+        if (newValue == 0)
+            busyFlag.postValue(false);
     }
     public boolean getBusyFlag() {
         return busyFlag.getValue();