fix handling connection error
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

This commit is contained in:
Umberto Furno 2020-01-15 21:49:50 +01:00
parent 1273e080ac
commit 162a53e1d8

View File

@ -148,14 +148,16 @@ public class BoardViewActivity extends AppCompatActivity {
ArrayAdapter<String> adapter = new ArrayAdapter<>(getApplicationContext(), ArrayAdapter<String> adapter = new ArrayAdapter<>(getApplicationContext(),
android.R.layout.simple_list_item_1, labelsTitle); android.R.layout.simple_list_item_1, labelsTitle);
listView.setAdapter(adapter); listView.setAdapter(adapter);
getListsButton.setEnabled(true);
} }
} }
@Override @Override
public void onFailure(@NotNull Call<Board> call, @NotNull Throwable t) { public void onFailure(@NotNull Call<Board> call, @NotNull Throwable t) {
Toast.makeText(getApplicationContext(), Toast.makeText(getApplicationContext(),
getApplicationContext().getString(R.string.board_deleted), "connection error",
Toast.LENGTH_LONG).show(); Toast.LENGTH_LONG).show();
getListsButton.setEnabled(false);
} }
}); });
} }