Commit fdabb372 authored by Leonardo Aramaki's avatar Leonardo Aramaki

Unset ticker retry action if connecting

parent 2b2a41d4
...@@ -256,11 +256,11 @@ public class MainActivity extends AbstractAuthedActivity implements MainContract ...@@ -256,11 +256,11 @@ public class MainActivity extends AbstractAuthedActivity implements MainContract
public void showConnectionError() { public void showConnectionError() {
if (statusTicker.get() != null && statusTicker.get().isShown()) { if (statusTicker.get() != null && statusTicker.get().isShown()) {
statusTicker.get().setText(R.string.fragment_retry_login_error_title) statusTicker.get().setText(R.string.fragment_retry_login_error_title)
.setAction(R.string.fragment_retry_login_retry_title, view -> { .setAction(R.string.fragment_retry_login_retry_title, view -> {
statusTicker.set(null); statusTicker.set(null);
showConnecting(); showConnecting();
ConnectivityManager.getInstance(getApplicationContext()).keepAliveServer(); ConnectivityManager.getInstance(getApplicationContext()).keepAliveServer();
}); });
} else { } else {
Snackbar newStatusTicker = Snackbar.make(findViewById(getLayoutContainerForFragment()), Snackbar newStatusTicker = Snackbar.make(findViewById(getLayoutContainerForFragment()),
R.string.fragment_retry_login_error_title, Snackbar.LENGTH_INDEFINITE) R.string.fragment_retry_login_error_title, Snackbar.LENGTH_INDEFINITE)
...@@ -277,7 +277,8 @@ public class MainActivity extends AbstractAuthedActivity implements MainContract ...@@ -277,7 +277,8 @@ public class MainActivity extends AbstractAuthedActivity implements MainContract
@Override @Override
public void showConnecting() { public void showConnecting() {
if (statusTicker.get() != null && statusTicker.get().isShown()) { if (statusTicker.get() != null && statusTicker.get().isShown()) {
statusTicker.get().setText(R.string.server_config_activity_authenticating); statusTicker.get().setText(R.string.server_config_activity_authenticating)
.setAction(null, null);
} else { } else {
Snackbar newStatusTicker = Snackbar.make(findViewById(getLayoutContainerForFragment()), Snackbar newStatusTicker = Snackbar.make(findViewById(getLayoutContainerForFragment()),
R.string.server_config_activity_authenticating, Snackbar.LENGTH_INDEFINITE); R.string.server_config_activity_authenticating, Snackbar.LENGTH_INDEFINITE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment