diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser index e3b0631b3..a2fc109a1 100644 Binary files a/.idea/caches/build_file_checksums.ser and b/.idea/caches/build_file_checksums.ser differ diff --git a/.idea/caches/gradle_models.ser b/.idea/caches/gradle_models.ser index dddba8939..2a16a2e0e 100644 Binary files a/.idea/caches/gradle_models.ser and b/.idea/caches/gradle_models.ser differ diff --git a/app/build.gradle b/app/build.gradle index ef56d2a14..e66e8ed8c 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -7,8 +7,8 @@ android { applicationId = 'com.wagerrwallet' minSdkVersion 23 targetSdkVersion 28 - versionCode 244 - versionName "244" + versionCode 245 + versionName "245" multiDexEnabled true // Similar to other properties in the defaultConfig block, diff --git a/app/src/main/java/com/wagerrwallet/presenter/activities/EventsActivity.java b/app/src/main/java/com/wagerrwallet/presenter/activities/EventsActivity.java index 57008be4c..3926229a8 100644 --- a/app/src/main/java/com/wagerrwallet/presenter/activities/EventsActivity.java +++ b/app/src/main/java/com/wagerrwallet/presenter/activities/EventsActivity.java @@ -121,8 +121,8 @@ public class EventsActivity extends BRActivity implements InternetManager.Connec private static EventsActivity app; private InternetManager mConnectionReceiver; - private TestLogger logger; + public boolean isSearchBarVisible = false; public static EventsActivity getApp() { return app; diff --git a/app/src/main/java/com/wagerrwallet/presenter/activities/WalletActivity.java b/app/src/main/java/com/wagerrwallet/presenter/activities/WalletActivity.java index 067a82adf..fce8ff210 100644 --- a/app/src/main/java/com/wagerrwallet/presenter/activities/WalletActivity.java +++ b/app/src/main/java/com/wagerrwallet/presenter/activities/WalletActivity.java @@ -97,8 +97,8 @@ public class WalletActivity extends BRActivity implements InternetManager.Connec private static WalletActivity app; private InternetManager mConnectionReceiver; - private TestLogger logger; + public boolean isSearchBarVisible = false; public static WalletActivity getApp() { return app; @@ -229,11 +229,7 @@ public void onClick(View v) { } public boolean isSearchActive() { - boolean ret = false; - if ( searchBar!=null && searchBar.isShown() ) { - ret = true; - } - return ret; + return isSearchBarVisible; } @Override diff --git a/app/src/main/java/com/wagerrwallet/presenter/customviews/BREventSearchBar.java b/app/src/main/java/com/wagerrwallet/presenter/customviews/BREventSearchBar.java index ae8812af2..bdde77f14 100644 --- a/app/src/main/java/com/wagerrwallet/presenter/customviews/BREventSearchBar.java +++ b/app/src/main/java/com/wagerrwallet/presenter/customviews/BREventSearchBar.java @@ -57,7 +57,7 @@ public class BREventSearchBar extends android.support.v7.widget.Toolbar { private LinearLayout barLayout; private LinearLayout betbarLayout; - public long[] filterSwitches = new long[4]; + public long[] filterSwitches = new long[2]; public BREventSearchBar(Context context) { super(context); @@ -156,7 +156,7 @@ public void beforeTextChanged(CharSequence s, int start, int count, int after) { @Override public void onTextChanged(CharSequence s, int start, int before, int count) { if (EventTxManager.getInstance().adapter != null) - EventTxManager.getInstance().adapter.filterBy(s.toString(), filterSwitches); + EventTxManager.getInstance().adapter.filterBy(s.toString()); } @Override @@ -246,6 +246,7 @@ public void run() { EventTxManager.getInstance().adapter.resetFilter(); } } + breadActivity.isSearchBarVisible = b; } public String getSearchQuery() { diff --git a/app/src/main/java/com/wagerrwallet/presenter/customviews/BRSearchBar.java b/app/src/main/java/com/wagerrwallet/presenter/customviews/BRSearchBar.java index 6bf591ef7..737cc25bb 100644 --- a/app/src/main/java/com/wagerrwallet/presenter/customviews/BRSearchBar.java +++ b/app/src/main/java/com/wagerrwallet/presenter/customviews/BRSearchBar.java @@ -267,6 +267,7 @@ public void run() { TxManager.getInstance().adapter.resetFilter(); } } + breadActivity.isSearchBarVisible = b; } diff --git a/app/src/main/java/com/wagerrwallet/tools/adapter/EventListAdapter.java b/app/src/main/java/com/wagerrwallet/tools/adapter/EventListAdapter.java index dd3b0c369..1167ce875 100644 --- a/app/src/main/java/com/wagerrwallet/tools/adapter/EventListAdapter.java +++ b/app/src/main/java/com/wagerrwallet/tools/adapter/EventListAdapter.java @@ -228,8 +228,8 @@ private void showTransactionFailed(EventHolder holder, EventTxUiHolder tx, boole } - public void filterBy(String query, long[] switches) { - filter(switches, true, query); + public void filterBy(String query) { + filter(filterSwitches, true, query); } public void resetFilter() { @@ -241,6 +241,7 @@ public void filter(final long[] switches, boolean bNotify, String query) { long start = System.currentTimeMillis(); int switchesON = 0; for (long i : switches) if (i>=0) switchesON++; + filterSwitches = switches; final List filteredList = new ArrayList<>(); String lowerQuery = query.toLowerCase().trim(); diff --git a/app/src/main/java/com/wagerrwallet/tools/manager/SendManager.java b/app/src/main/java/com/wagerrwallet/tools/manager/SendManager.java index fd1402a5a..609429e07 100644 --- a/app/src/main/java/com/wagerrwallet/tools/manager/SendManager.java +++ b/app/src/main/java/com/wagerrwallet/tools/manager/SendManager.java @@ -265,7 +265,15 @@ public void onClick(BRDialogView brDialogView) { } }, null, null, 0); } else { - if (Utils.isNullOrEmpty(item.address)) throw new RuntimeException("can't happen"); + if (Utils.isNullOrEmpty(item.address)) { + BRDialog.showCustomDialog(app, app.getString(R.string.Alerts_sendFailure), "Error while obtaining destination address, please report case if it persists.", app.getString(R.string.Button_ok), null, new BRDialogView.BROnClickListener() { + @Override + public void onClick(BRDialogView brDialogView) { + brDialogView.dismissWithAnimation(); + } + }, null, null, 0); + return; + } final BRCoreTransaction tx = wm.getWallet().createTransaction(maxAmountDouble, new BRCoreAddress(item.address)); if (tx == null) { BRDialog.showCustomDialog(app, app.getString(R.string.Alerts_sendFailure), "Insufficient amount for transaction fee", app.getString(R.string.Button_ok), null, new BRDialogView.BROnClickListener() {