Save reply info in draft, refactor (#449)

* Save reply info in draft, refactor

* Handle replying to deleted status
This commit is contained in:
Ivan Kupalov 2017-11-16 21:18:11 +03:00 committed by Konrad Pozniak
commit 2575b16dad
15 changed files with 575 additions and 390 deletions

View file

@ -320,9 +320,9 @@ public class ViewThreadFragment extends SFragment implements
call.enqueue(new Callback<StatusContext>() {
@Override
public void onResponse(@NonNull Call<StatusContext> call, @NonNull Response<StatusContext> response) {
if (response.isSuccessful()) {
StatusContext context = response.body();
if (response.isSuccessful() && context != null) {
swipeRefreshLayout.setRefreshing(false);
StatusContext context = response.body();
setContext(context.ancestors, context.descendants);
} else {
onThreadRequestFailure(id);