Compatible with social model 2.0.0
This commit is contained in:
parent
cd5497507d
commit
3f7a9ae8a0
|
@ -34,7 +34,6 @@ public class CommentNotificationsThread implements Runnable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param libclient
|
|
||||||
* @param userManager
|
* @param userManager
|
||||||
* @param commenterUserId
|
* @param commenterUserId
|
||||||
* @param commentedPostId
|
* @param commentedPostId
|
||||||
|
@ -44,7 +43,7 @@ public class CommentNotificationsThread implements Runnable {
|
||||||
* @param commentKey
|
* @param commentKey
|
||||||
* @param likes
|
* @param likes
|
||||||
*/
|
*/
|
||||||
public CommentNotificationsThread(LibClient libclient, UserManager userManager, String commenterUserId,
|
public CommentNotificationsThread(UserManager userManager, String commenterUserId,
|
||||||
String commentedPostId, String commentText, NotificationsManager nm, String postOwnerId, String commentKey, ArrayList<Like> likes) {
|
String commentedPostId, String commentText, NotificationsManager nm, String postOwnerId, String commentKey, ArrayList<Like> likes) {
|
||||||
super();
|
super();
|
||||||
this.nm = nm;
|
this.nm = nm;
|
||||||
|
@ -55,15 +54,21 @@ public class CommentNotificationsThread implements Runnable {
|
||||||
this.commentKey = commentKey;
|
this.commentKey = commentKey;
|
||||||
this.likes = likes;
|
this.likes = likes;
|
||||||
this.userManager = userManager;
|
this.userManager = userManager;
|
||||||
|
try {
|
||||||
userIdsToNotify = new HashSet<String>();
|
LibClient libClient = new LibClient();
|
||||||
List<Comment> postComments = libclient.getAllCommentsByPostIdLib(commentedPostId);
|
userIdsToNotify = new HashSet<String>();
|
||||||
for (Comment comment : postComments) {
|
List<Comment> postComments = libClient.getAllCommentsByPostIdLib(commentedPostId);
|
||||||
if (comment.getUserid().compareTo(commenterUserId) != 0) {
|
for (Comment comment : postComments) {
|
||||||
userIdsToNotify.add(comment.getUserid());
|
if (comment.getUserid().compareTo(commenterUserId) != 0) {
|
||||||
|
userIdsToNotify.add(comment.getUserid());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//clean
|
//clean
|
||||||
//this.comments = comments;
|
//this.comments = comments;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue