Merge branch 'master' into muserstory_remove

# By Samuel Clay (1) and ojiikun (1)
* master:
  Adding node group to fabfile.
  Fix crash on empty use pictures.
This commit is contained in:
Samuel Clay 2013-05-14 16:01:29 -07:00
commit 43ab118a21

View file

@ -237,16 +237,18 @@ public class SetupCommentSectionTask extends AsyncTask<Void, Void, Void> {
commentCursor.moveToNext(); commentCursor.moveToNext();
} }
for (final String userId : story.sharedUserIds) { for (final String userId : story.sharedUserIds) {
if (!commentIds.contains(userId)) { if (!commentIds.contains(userId)) {
Cursor userCursor = resolver.query(FeedProvider.USERS_URI, null, DatabaseConstants.USER_USERID + " IN (?)", new String[] { userId }, null); Cursor userCursor = resolver.query(FeedProvider.USERS_URI, null, DatabaseConstants.USER_USERID + " IN (?)", new String[] { userId }, null);
UserProfile user = UserProfile.fromCursor(userCursor); if (userCursor.getCount() > 0) {
userCursor.close(); UserProfile user = UserProfile.fromCursor(userCursor);
userCursor.close();
ImageView image = ViewUtils.createSharebarImage(context, imageLoader, user.photoUrl, user.userId); ImageView image = ViewUtils.createSharebarImage(context, imageLoader, user.photoUrl, user.userId);
sharedGrid.addView(image); sharedGrid.addView(image);
} }
} }
}
commentCursor.moveToFirst(); commentCursor.moveToFirst();