]> git.ktnx.net Git - mobile-ledger.git/commitdiff
whitespace
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 17 Nov 2019 17:24:04 +0000 (19:24 +0200)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 17 Nov 2019 17:24:18 +0000 (19:24 +0200)
app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionActivity.java
app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionModel.java

index a9d74727bd2d51f0a1056195490cb9a7059b84f4..c0c902eb1734a16f0415e0f9d966372f6a2e56b0 100644 (file)
@@ -151,10 +151,12 @@ public class NewTransactionActivity extends ProfileThemedActivity implements Tas
 
         if (profileUUID != null) {
             mProfile = Data.getProfile(profileUUID);
-            if (mProfile == null) finish();
+            if (mProfile == null)
+                finish();
             Data.setCurrentProfile(mProfile);
         }
-        else super.initProfile();
+        else
+            super.initProfile();
     }
     @Override
     public void finish() {
@@ -176,7 +178,8 @@ public class NewTransactionActivity extends ProfileThemedActivity implements Tas
         // FIXME if (tvDescription.getText().toString().isEmpty()) tvDescription.requestFocus();
     }
     public void saveTransaction() {
-        if (fab != null) fab.setEnabled(false);
+        if (fab != null)
+            fab.setEnabled(false);
         listAdapter.toggleAllEditing(false);
         progress.setVisibility(View.VISIBLE);
         try {
@@ -193,7 +196,8 @@ public class NewTransactionActivity extends ProfileThemedActivity implements Tas
                 LedgerTransactionAccount acc = viewModel.getAccount(i);
                 if (acc.getAccountName()
                        .trim()
-                       .isEmpty()) continue;
+                       .isEmpty())
+                    continue;
 
                 if (acc.isAmountSet()) {
                     emptyAmountAccountBalance += acc.getAmount();
@@ -214,7 +218,8 @@ public class NewTransactionActivity extends ProfileThemedActivity implements Tas
 
             progress.setVisibility(View.GONE);
             listAdapter.toggleAllEditing(true);
-            if (fab != null) fab.setEnabled(true);
+            if (fab != null)
+                fab.setEnabled(true);
         }
     }
     public void simulateCrash(MenuItem item) {
@@ -248,10 +253,12 @@ public class NewTransactionActivity extends ProfileThemedActivity implements Tas
 
         if (error == null)
             listAdapter.reset();
-        else Snackbar.make(list, error, BaseTransientBottomBar.LENGTH_LONG)
-                     .show();
+        else
+            Snackbar.make(list, error, BaseTransientBottomBar.LENGTH_LONG)
+                    .show();
 
         listAdapter.toggleAllEditing(true);
+
         viewModel.checkTransactionSubmittable(listAdapter);
     }
 
index 443c21f911ff310681c683a60fdd744e77a95c5f..f6d556e58573c5ff2217767261f5fb70da8745dd 100644 (file)
@@ -247,6 +247,8 @@ public class NewTransactionModel extends ViewModel {
     }
     enum ItemType {generalData, transactionRow, bottomFiller}
 
+    //==========================================================================================
+
     class Item extends Object {
         private ItemType type;
         private MutableLiveData<Date> date = new MutableLiveData<>();