mirror of
https://github.com/KokaKiwi/BarInsta
synced 2024-11-25 16:17:29 +00:00
close #1397
This commit is contained in:
parent
8f218b9515
commit
8bb0fba4cb
@ -66,6 +66,10 @@ public class CommentsViewerViewModel extends ViewModel {
|
|||||||
@Override
|
@Override
|
||||||
public void onSuccess(final CommentsFetchResponse result) {
|
public void onSuccess(final CommentsFetchResponse result) {
|
||||||
// Log.d(TAG, "onSuccess: " + result);
|
// Log.d(TAG, "onSuccess: " + result);
|
||||||
|
if (result == null) {
|
||||||
|
rootList.postValue(Resource.error(t.getMessage(), getPrevList(rootList)));
|
||||||
|
return;
|
||||||
|
}
|
||||||
List<Comment> comments = result.getComments();
|
List<Comment> comments = result.getComments();
|
||||||
if (rootCursor == null) {
|
if (rootCursor == null) {
|
||||||
rootCount.postValue(result.getCommentCount());
|
rootCount.postValue(result.getCommentCount());
|
||||||
@ -88,6 +92,10 @@ public class CommentsViewerViewModel extends ViewModel {
|
|||||||
@Override
|
@Override
|
||||||
public void onSuccess(final ChildCommentsFetchResponse result) {
|
public void onSuccess(final ChildCommentsFetchResponse result) {
|
||||||
// Log.d(TAG, "onSuccess: " + result);
|
// Log.d(TAG, "onSuccess: " + result);
|
||||||
|
if (result == null) {
|
||||||
|
rootList.postValue(Resource.error(t.getMessage(), getPrevList(replyList)));
|
||||||
|
return;
|
||||||
|
}
|
||||||
List<Comment> comments = result.getChildComments();
|
List<Comment> comments = result.getChildComments();
|
||||||
// Replies
|
// Replies
|
||||||
if (repliesCursor == null) {
|
if (repliesCursor == null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user