fix handling connection error
This commit is contained in:
parent
1273e080ac
commit
162a53e1d8
@ -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);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user