Enable supervisors to get an overview of forum activity #3
@ -20,7 +20,7 @@ public abstract class AbstractReadStatePanel extends Panel {
|
||||
@Override
|
||||
public void onClick(final Optional<AjaxRequestTarget> target) {
|
||||
target.ifPresent(t -> {
|
||||
toggleReadState(t);
|
||||
onFlagClick(t);
|
||||
t.add(icon);
|
||||
});
|
||||
}
|
||||
@ -33,7 +33,7 @@ public abstract class AbstractReadStatePanel extends Panel {
|
||||
}
|
||||
|
||||
protected abstract boolean isRead();
|
||||
protected abstract void toggleReadState(final AjaxRequestTarget target);
|
||||
protected abstract void onFlagClick(final AjaxRequestTarget target);
|
||||
|
||||
public static final String TOGGLE = "toggle";
|
||||
static final String ICON = "icon";
|
||||
|
@ -31,7 +31,7 @@ public class ThreadReadStatePanel extends AbstractReadStatePanel {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void toggleReadState(final AjaxRequestTarget target) {
|
||||
protected void onFlagClick(final AjaxRequestTarget target) {
|
||||
boolean read = isRead();
|
||||
basicForumService.setThreadRead(SciProSession.get().getUser(), model.getObject(), !read);
|
||||
|
||||
|
@ -117,7 +117,7 @@ public class NotificationDataPanel extends Panel {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void toggleReadState(final AjaxRequestTarget target) {
|
||||
protected void onFlagClick(final AjaxRequestTarget target) {
|
||||
Notification notification = rowModel.getObject();
|
||||
notification.setUnread(!notification.isUnread());
|
||||
notificationService.save(notification);
|
||||
|
Loading…
x
Reference in New Issue
Block a user