]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/model/TransactionListItem.java
drop remnants of gradual transaction data loading, and last non-Room SQL
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / model / TransactionListItem.java
index 550a84c5ed25d020ea0d488db89d3e634dd81582..82a15f36f8b61c3a3cdfb44d668f3380684d347a 100644 (file)
@@ -20,7 +20,6 @@ package net.ktnx.mobileledger.model;
 import androidx.annotation.NonNull;
 import androidx.annotation.Nullable;
 
-import net.ktnx.mobileledger.App;
 import net.ktnx.mobileledger.utils.SimpleDate;
 
 import org.jetbrains.annotations.NotNull;
@@ -53,9 +52,8 @@ public class TransactionListItem {
     public SimpleDate getDate() {
         if (date != null)
             return date;
-        if (type == Type.HEADER)
-            throw new IllegalStateException("Header item has no date");
-        transaction.loadData(App.getDatabase());
+        if (type != Type.TRANSACTION)
+            throw new IllegalStateException("Only transaction items have a date");
         return transaction.getDate();
     }
     public boolean isMonthShown() {