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(),
android.R.layout.simple_list_item_1, labelsTitle);
listView.setAdapter(adapter);
getListsButton.setEnabled(true);
}
}
@Override
public void onFailure(@NotNull Call<Board> call, @NotNull Throwable t) {
Toast.makeText(getApplicationContext(),
getApplicationContext().getString(R.string.board_deleted),
"connection error",
Toast.LENGTH_LONG).show();
getListsButton.setEnabled(false);
}
});
}