Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix for displaying comments in the web console

  • Loading branch information...
commit f19a7385c4d469a932458595765d1e00a9e0d775 1 parent 84bd0bf
@lfaggioli lfaggioli authored
View
8 src/org/onesocialweb/gwt/client/ui/widget/activity/InboxPanel.java
@@ -44,15 +44,13 @@ public InboxPanel() {
buttons.setVisible(false);
}
- public void updateActivityReplies(String activityID) {
-
- Stream<ActivityEntry> replies = OswServiceFactory.getService().getReplies(activityID);
+ public void updateActivityReplies(String activityId) {
WidgetCollection activityWidgets = getChildren();
for(Widget widget: activityWidgets) {
if(widget instanceof ActivityItemView) {
ActivityItemView aiv = (ActivityItemView) widget;
- if(activityID.equals(aiv.getActivity().getId())) {
+ if(activityId.equals(aiv.getActivity().getId())) {
StyledFlowPanel replieswrapper = aiv.replieswrapper;
int repliesWidgetCount = replieswrapper.getWidgetCount();
for(int i=0; i< repliesWidgetCount; i++) {
@@ -60,7 +58,7 @@ public void updateActivityReplies(String activityID) {
if(w instanceof CommentPanel) {
CommentPanel commentPanel = (CommentPanel) w;
RepliesPanel repliesPanel = commentPanel.getReplies();
- repliesPanel.setModel(replies);
+ repliesPanel.setModel(OswServiceFactory.getService().getReplies(aiv.getActivity()));
repliesPanel.repaint();
} else if(w instanceof StyledLabel) {
StyledLabel label = (StyledLabel) w;
View
9 src/org/onesocialweb/gwt/client/ui/widget/compose/CommentPanel.java
@@ -138,7 +138,7 @@ public void handlePicture(String pictureUrl) {
});
Stream<ActivityEntry> repliesModel = OswServiceFactory.getService().getReplies(
- parentActivity.getId());
+ parentActivity);
replies.setModel(repliesModel);
// Add components to page
@@ -207,7 +207,7 @@ private void postComment() {
return;
ActivityObject object = service.getActivityFactory().object(
- ActivityObject.STATUS_UPDATE);
+ ActivityObject.COMMENT);
object.addContent(service.getAtomFactory().content(status,
"text/plain", null));
object.setPublished(now);
@@ -250,6 +250,9 @@ private void postComment() {
}
entry.addAclRule(rule);
*/
+
+ //we assume that the comment should inherit the ACL Rules from the original message (parent message)
+ entry.setAclRules(parentActivity.getAclRules());
// we got everything we need -> clean up UI
reset();
@@ -270,7 +273,7 @@ public void onSuccess(ActivityEntry result) {
});
- replies.setModel(service.getReplies(parentActivity.getId()));
+ replies.setModel(service.getReplies(parentActivity));
replies.repaint();
buttonUpdate.setEnabled(true);
Please sign in to comment.
Something went wrong with that request. Please try again.