]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/db/AccountAutocompleteAdapter.java
rework new transaction activity/model/etc with proper concept separation
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / db / AccountAutocompleteAdapter.java
index ecc21db74e69e624c28d56f02a53bc696a451262..6cf1dc8c3c16808c7b9f310c1b04229d4d5fc6de 100644 (file)
@@ -24,6 +24,7 @@ import android.widget.Filter;
 import androidx.annotation.NonNull;
 
 import net.ktnx.mobileledger.dao.AccountDAO;
+import net.ktnx.mobileledger.model.MobileLedgerProfile;
 import net.ktnx.mobileledger.utils.Logger;
 
 import java.util.ArrayList;
@@ -37,6 +38,10 @@ public class AccountAutocompleteAdapter extends ArrayAdapter<String> {
     public AccountAutocompleteAdapter(Context context) {
         super(context, android.R.layout.simple_dropdown_item_1line, new ArrayList<>());
     }
+    public AccountAutocompleteAdapter(Context context, @NonNull MobileLedgerProfile profile) {
+        this(context);
+        profileUUID = profile.getUuid();
+    }
     public void setProfileUUID(String profileUUID) {
         this.profileUUID = profileUUID;
     }