From 094a00b47627fd768008046db40a4d9ff7e5950a Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Fri, 7 Dec 2018 05:55:43 +0000 Subject: [PATCH] fix snack-bar showing in case of account update errors --- .../main/java/net/ktnx/mobileledger/AccountSummary.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/net/ktnx/mobileledger/AccountSummary.java b/app/src/main/java/net/ktnx/mobileledger/AccountSummary.java index a53b2eac..882403ec 100644 --- a/app/src/main/java/net/ktnx/mobileledger/AccountSummary.java +++ b/app/src/main/java/net/ktnx/mobileledger/AccountSummary.java @@ -161,9 +161,11 @@ public class AccountSummary extends AppCompatActivity { pb.setVisibility(GONE); pt.setVisibility(GONE); mRefresh.setVisible(true); - if (this.error != 0) - Snackbar.make(drawer, rm.getString(this.error), Snackbar.LENGTH_LONG ); - else + if (this.error != 0) { + String err_text = rm.getString(this.error); + Log.d("visual", String.format("showing snackbar: %s", err_text)); + Snackbar.make(drawer, err_text, Snackbar.LENGTH_LONG ).show(); + } else set_option_value("last_refresh", new Date().getTime() ); } }; -- 2.39.5