Enable supervisors to get an overview of forum activity #3

Merged
ansv7779 merged 2 commits from supervisor-forum-overview into develop 2024-07-10 13:18:21 +02:00
3 changed files with 4 additions and 4 deletions
Showing only changes of commit 69f4b9b440 - Show all commits

View File

@ -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";

View File

@ -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);

View File

@ -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);