public void markAsUnread(Preferences prefs) { setMarkedReadAt(Optional.empty()); prefs.clearMarkedReadAt(getRepoId(), getId()); }
public void markAsRead(Preferences prefs) { LocalDateTime now = LocalDateTime.now(); setMarkedReadAt(Optional.of(now)); prefs.setMarkedReadAt(getRepoId(), getId(), getMarkedReadAt().get()); }