]> git.ktnx.net Git - mobile-ledger.git/commitdiff
fix snack-bar showing in case of account update errors
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Fri, 7 Dec 2018 05:55:43 +0000 (05:55 +0000)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Fri, 7 Dec 2018 05:55:43 +0000 (05:55 +0000)
app/src/main/java/net/ktnx/mobileledger/AccountSummary.java

index a53b2eac6b6f6981631fc34fc61e3cfe102404f5..882403ec9d74c84eba932fdc2525f94119aaefcb 100644 (file)
@@ -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() );
             }
         };