-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
News #803
News #803
Conversation
# Conflicts: # src/main/java/fi/aalto/cs/apluscourses/intellij/actions/OpenItemAction.java # src/main/java/fi/aalto/cs/apluscourses/intellij/toolwindows/APlusToolWindowFactory.java # src/main/java/fi/aalto/cs/apluscourses/intellij/utils/Interfaces.java # src/main/java/fi/aalto/cs/apluscourses/presentation/MainViewModel.java # src/main/java/fi/aalto/cs/apluscourses/ui/CollapsibleSplitter.java # src/main/resources/resources.properties
# Conflicts: # src/main/java/fi/aalto/cs/apluscourses/intellij/model/CourseUpdater.java # src/main/java/fi/aalto/cs/apluscourses/intellij/toolwindows/APlusToolWindowFactory.java
# Conflicts: # src/main/java/fi/aalto/cs/apluscourses/intellij/model/CourseUpdater.java # src/main/java/fi/aalto/cs/apluscourses/intellij/toolwindows/APlusToolWindowFactory.java
Please retry analysis of this Pull-Request directly on SonarCloud. |
presentation.userDropdown.notLoggedIn=Not logged in | ||
presentation.userDropdown.loggedInAs=Logged in as {0} | ||
presentation.userDropdown.notLoggedIn=Not Logged In | ||
presentation.userDropdown.loggedInAs=Logged In As {0} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! I wrote some nits and questions but this is mergeable also as-is. Nice reuse of existing logic. Well done!
@@ -27,6 +27,7 @@ repositories { | |||
} | |||
|
|||
dependencies { | |||
implementation 'org.jsoup:jsoup:1.14.3' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you consider other alternatives? Anyway, this looks like a good choice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I read some comparisons online and this seemed like the best choice
|
||
public class OpenItemAction extends DumbAwareAction { | ||
public class OpenItemAction<T> extends DumbAwareAction { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This class: Excellent!
newsViewModel.getModel().getNews().forEach(News::setRead); | ||
mainViewModel.newsTreeViewModel.valueChanged(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: This logic could perhaps be in the model.
return readNews.getReadNews() != null | ||
&& Arrays.stream(readNews.getReadNews().split(";")).anyMatch(idS -> Long.parseLong(idS) == this.id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Store the array in a variable instead of getting it twice.
@NotNull Options options) { | ||
@Nullable Options options) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you consider using some kind of "allGoesOptions" instead of making this nullable? That way some null checks below could perhaps have been avoided.
|
||
@NotNull | ||
public String getTitle() { | ||
var unread = getModel().getNews().stream().filter(news -> !news.isRead()).count(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NitL This logic would be better in the model.
…nges # Conflicts: # src/main/java/fi/aalto/cs/apluscourses/intellij/utils/Interfaces.java # src/test/java/fi/aalto/cs/apluscourses/intellij/model/CourseUpdaterTest.java
…nges # Conflicts: # src/main/java/fi/aalto/cs/apluscourses/intellij/utils/Interfaces.java # src/test/java/fi/aalto/cs/apluscourses/intellij/model/CourseUpdaterTest.java
Description of the PR
Testing
Have you updated the TESTING.md or other relevant documentation on your branch?