]> git.ktnx.net Git - mobile-ledger.git/commitdiff
fix transaction account filter selection
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 17 May 2020 17:45:48 +0000 (20:45 +0300)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 17 May 2020 17:45:48 +0000 (20:45 +0300)
broken with 64d69a2f7f729949b9236489ab7c4ce9f9aaea86 (v0.12.0)

app/src/main/java/net/ktnx/mobileledger/ui/transaction_list/TransactionListFragment.java

index edd3782578faf550a60cbae1fb1d9edf043bee07..3625ea40a64f3412adc99b7efb6573846e8d1de9 100644 (file)
@@ -18,7 +18,7 @@
 package net.ktnx.mobileledger.ui.transaction_list;
 
 import android.content.Context;
-import android.database.MatrixCursor;
+import android.database.Cursor;
 import android.os.Bundle;
 import android.view.LayoutInflater;
 import android.view.Menu;
@@ -125,8 +125,8 @@ public class TransactionListFragment extends MobileLedgerListFragment {
         MLDB.hookAutocompletionAdapter(mActivity, accNameFilter, "accounts", "name");
         accNameFilter.setOnItemClickListener((parent, view, position, id) -> {
 //                debug("tmp", "direct onItemClick");
-            MatrixCursor mc = (MatrixCursor) parent.getItemAtPosition(position);
-            Data.accountFilter.setValue(mc.getString(1));
+            Cursor c = (Cursor) parent.getItemAtPosition(position);
+            Data.accountFilter.setValue(c.getString(1));
             Globals.hideSoftKeyboard(mActivity);
         });