mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
fix crash on missing user profile data
This commit is contained in:
parent
995256fb31
commit
1bf62d4b91
2 changed files with 8 additions and 1 deletions
|
@ -103,11 +103,18 @@ public abstract class ProfileActivityDetailsFragment extends Fragment implements
|
|||
if (id == null) {
|
||||
id = user.id;
|
||||
}
|
||||
if (id == null) {
|
||||
return null;
|
||||
}
|
||||
return loadActivityDetails(id, pageNumber);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPostExecute(ActivityDetails[] result) {
|
||||
if (result == null) {
|
||||
com.newsblur.util.Log.w(getClass().getName(), "couldn't load page from API");
|
||||
return;
|
||||
}
|
||||
if (pageNumber == 1 && result.length == 0) {
|
||||
View emptyView = activityList.getEmptyView();
|
||||
TextView textView = (TextView) emptyView.findViewById(R.id.empty_view_text);
|
||||
|
|
|
@ -24,7 +24,7 @@ public class ProfileInteractionsFragment extends ProfileActivityDetailsFragment
|
|||
if (interactionsResponse != null) {
|
||||
return interactionsResponse.interactions;
|
||||
} else {
|
||||
return new ActivityDetails[0];
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue