Added more statuses for notifications regarding how long time has pas… #91
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request refactors how monitored directory notification statuses are determined and displayed. The main change is the introduction of a new
DirNotificationStatusenum, which centralizes the logic for determining the status, associated colors, and tooltips for monitored directories. This replaces the previous approach that relied on multiple boolean checks and manual string handling, resulting in clearer, more maintainable, and extensible code.Monitored Directory Notification Status Refactor:
DirNotificationStatusenum inMonitoredDirectoryUtil, encapsulating all possible directory notification states (e.g.,UP_TO_DATE,NO_BASELINE,WEEK_OLD, etc.), and providing methods for retrieving the appropriate foreground color and tooltip text for each status.HomeController's list cell renderer with a call toMonitoredDirectoryUtil.getDirNotificationStatus, using the enum's methods to set foreground color and tooltip text, simplifying and unifying the UI feedback logic.getMonitoredDirectoryNotificationMessageinMonitoredDirectoryUtilto use the new enum, providing more granular and descriptive notification messages for each directory status.HomeController.java.isScanOlderThanAWeek,isScanOlderThan1Minute) and replaced them with the newgetDirNotificationStatusmethod, which determines the directory status based on the time since the last scan.These changes make the notification system for monitored directories more robust, easier to extend, and improve the clarity of both the code and the user interface.