mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Merge pull request #245 from ojiikun/master
Android: Fix Weekly Top Crash
This commit is contained in:
commit
ec47919e2d
1 changed files with 11 additions and 9 deletions
|
@ -237,16 +237,18 @@ public class SetupCommentSectionTask extends AsyncTask<Void, Void, Void> {
|
|||
commentCursor.moveToNext();
|
||||
}
|
||||
|
||||
for (final String userId : story.sharedUserIds) {
|
||||
if (!commentIds.contains(userId)) {
|
||||
Cursor userCursor = resolver.query(FeedProvider.USERS_URI, null, DatabaseConstants.USER_USERID + " IN (?)", new String[] { userId }, null);
|
||||
UserProfile user = UserProfile.fromCursor(userCursor);
|
||||
userCursor.close();
|
||||
for (final String userId : story.sharedUserIds) {
|
||||
if (!commentIds.contains(userId)) {
|
||||
Cursor userCursor = resolver.query(FeedProvider.USERS_URI, null, DatabaseConstants.USER_USERID + " IN (?)", new String[] { userId }, null);
|
||||
if (userCursor.getCount() > 0) {
|
||||
UserProfile user = UserProfile.fromCursor(userCursor);
|
||||
userCursor.close();
|
||||
|
||||
ImageView image = ViewUtils.createSharebarImage(context, imageLoader, user.photoUrl, user.userId);
|
||||
sharedGrid.addView(image);
|
||||
}
|
||||
}
|
||||
ImageView image = ViewUtils.createSharebarImage(context, imageLoader, user.photoUrl, user.userId);
|
||||
sharedGrid.addView(image);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
commentCursor.moveToFirst();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue