From: Damyan Ivanov Date: Fri, 7 Dec 2018 05:55:43 +0000 (+0000) Subject: fix snack-bar showing in case of account update errors X-Git-Tag: v0.3~307 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=094a00b47627fd768008046db40a4d9ff7e5950a;p=mobile-ledger.git fix snack-bar showing in case of account update errors --- 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() ); } };