Repository navigation
Feature: Show update reminder every 14 days - #3597
Conversation
WalkthroughThe pull request introduces several changes primarily focused on the update reminder functionality within the Cryptomator application. In the The Assessment against linked issues
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Outside diff range and nitpick comments (5)
src/main/java/org/cryptomator/ui/updatereminder/UpdateReminderComponent.java (1)
Line range hint 1-33: Well-structured architectural changes.
The removal of settings and conditional checks from this component demonstrates good separation of concerns. The interface now focuses solely on UI operations, making it more maintainable and allowing the 14-day reminder logic to be handled at the appropriate layer.
src/main/java/org/cryptomator/common/settings/SettingsJson.java (1)
82-85: LGTM! Consider adding documentation.
The property is well-structured with appropriate JSON annotations and timezone handling. Consider adding a Javadoc comment to document the 14-day reminder logic and its relationship with lastSuccessfulUpdateCheck.
Add documentation:
+ /**
+ * Tracks when the update reminder was last shown to the user.
+ * Used in conjunction with lastSuccessfulUpdateCheck to ensure
+ * reminders are shown every 14 days when updates are available.
+ */
@JsonProperty("lastReminderForUpdateCheck")src/main/java/org/cryptomator/ui/fxapp/UpdateChecker.java (1)
Line range hint 1-140: Consider architectural improvements for update reminder functionality.
While the property rename is good, I notice that this class currently only handles update checking but not the update reminder logic mentioned in the PR objectives. Consider the following architectural suggestions:
- Add a new property
lastReminderShownto track when the last reminder was displayed - Add a method to determine if a reminder should be shown based on the 14-day criteria
- Consider using a builder pattern or factory method to construct the conditions for showing reminders
This would help encapsulate all update-related logic in one place and make the 14-day reminder logic more maintainable.
Example implementation:
public class UpdateChecker {
private final ObjectProperty<Instant> lastReminderShown;
public boolean shouldShowReminder() {
return settings.checkForUpdatesEnabled.get()
&& !isAutomaticCheckEnabled()
&& isOlderThan14Days(lastSuccessfulUpdateCheck.get())
&& isOlderThan14Days(lastReminderShown.get());
}
private boolean isOlderThan14Days(Instant timestamp) {
return timestamp == null
|| timestamp.plus(Duration.ofDays(14)).isBefore(Instant.now());
}
}src/main/java/org/cryptomator/ui/preferences/UpdatesPreferencesController.java (1)
Line range hint 142-156: Consider enhancing time difference formatting.
The current implementation only shows hours/days ago. For better alignment with the 14-day reminder feature, consider:
- Adding specific handling for the 14-day threshold
- Improving readability for longer durations
Here's a suggested improvement:
public String getTimeDifferenceMessage() {
var lastSuccessCheck = lastSuccessfulUpdateCheck.getValue();
var duration = Duration.between(lastSuccessCheck, Instant.now());
var hours = duration.toHours();
if (lastSuccessCheck.equals(Settings.DEFAULT_TIMESTAMP)) {
return resourceBundle.getString("preferences.updates.lastUpdateCheck.never");
} else if (hours < 1) {
return resourceBundle.getString("preferences.updates.lastUpdateCheck.recently");
} else if (hours < 24) {
return String.format(resourceBundle.getString("preferences.updates.lastUpdateCheck.hoursAgo"), hours);
- } else {
+ } else if (duration.toDays() < 14) {
return String.format(resourceBundle.getString("preferences.updates.lastUpdateCheck.daysAgo"), duration.toDays());
+ } else {
+ long weeks = duration.toDays() / 7;
+ return String.format(resourceBundle.getString("preferences.updates.lastUpdateCheck.weeksAgo"), weeks);
}
}Note: You'll need to add the new weeksAgo string to the resource bundle.
src/main/java/org/cryptomator/common/settings/Settings.java (1)
75-76: Consider adding JavaDoc for the new properties.
To improve maintainability, consider adding JavaDoc comments for the new properties explaining:
- The purpose of each property
- The 14-day update reminder logic
- The relationship between these properties and the update reminder functionality
Example documentation:
/**
* Controls whether update checking is enabled.
* When true, the application will check for updates based on configured intervals.
*/
public final BooleanProperty checkForUpdatesEnabled;
/**
* Tracks when the last update reminder was shown to the user.
* Used to ensure reminders are shown no more frequently than every 14 days.
*/
public final ObjectProperty<Instant> lastReminderForUpdateCheck;📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (9)
- src/main/java/org/cryptomator/common/settings/Settings.java (5 hunks)
- src/main/java/org/cryptomator/common/settings/SettingsJson.java (1 hunks)
- src/main/java/org/cryptomator/ui/fxapp/FxApplication.java (2 hunks)
- src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java (4 hunks)
- src/main/java/org/cryptomator/ui/fxapp/UpdateChecker.java (1 hunks)
- src/main/java/org/cryptomator/ui/fxapp/UpdateCheckerModule.java (1 hunks)
- src/main/java/org/cryptomator/ui/preferences/UpdatesPreferencesController.java (1 hunks)
- src/main/java/org/cryptomator/ui/updatereminder/UpdateReminderComponent.java (1 hunks)
- src/main/java/org/cryptomator/ui/updatereminder/UpdateReminderController.java (3 hunks)
🔇 Additional comments (20)
src/main/java/org/cryptomator/ui/updatereminder/UpdateReminderComponent.java (1)
21-25: LGTM! Consider thread safety for JavaFX operations.
The simplified method aligns well with the Single Responsibility Principle, focusing solely on window display logic. However, ensure these JavaFX operations are performed on the JavaFX Application Thread.
Let's verify if the calling code handles thread safety:
✅ Verification successful
Based on the search results, I can now generate the final response as the verification is complete:
Thread safety is properly handled in the calling code ✓
The showUpdateReminderWindow() is called through FxApplicationWindows which properly wraps the call in Platform.runLater():
CompletableFuture.runAsync(() -> updateReminderWindowFactory.create().showUpdateReminderWindow(), Platform::runLater);🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check if the showUpdateReminderWindow() is called within Platform.runLater()
# or if there are any thread safety measures in place
# Search for calls to showUpdateReminderWindow
rg -B 5 -A 5 "showUpdateReminderWindow"
# Search for Platform.runLater usage in related files
rg -B 5 -A 5 "Platform\.runLater.*showUpdateReminderWindow"
Length of output: 3597
src/main/java/org/cryptomator/ui/updatereminder/UpdateReminderController.java (2)
46-46: Verify consistent usage of renamed property.
The property rename from checkForUpdates to checkForUpdatesEnabled improves clarity. Let's verify that this change is consistent across the codebase.
#!/bin/bash
# Description: Verify no remaining references to old property name
# Expected: No occurrences of old property name 'checkForUpdates'
echo "Checking for any remaining references to old property name..."
rg "checkForUpdates[^E]" # Matches checkForUpdates not followed by 'E' (from Enabled)
echo "Verifying consistent usage of new property name..."
rg "checkForUpdatesEnabled"27-30: 🛠️ Refactor suggestion
Consider moving timestamp update to action methods.
The initialize() method sets lastReminderForUpdateCheck when the dialog opens, but this might prevent future reminders even if the user dismisses the dialog without taking action. Consider moving this timestamp update to once(), automatically(), and potentially cancel() methods depending on the desired behavior.
Let's verify the current behavior in other files:
Here's a suggested implementation:
-@FXML
-public void initialize() {
- settings.lastReminderForUpdateCheck.set(Instant.now());
-}
@FXML
public void cancel() {
+ settings.lastReminderForUpdateCheck.set(Instant.now());
window.close();
}
@FXML
public void once() {
+ settings.lastReminderForUpdateCheck.set(Instant.now());
updateChecker.checkForUpdatesNow();
window.close();
}
@FXML
public void automatically() {
+ settings.lastReminderForUpdateCheck.set(Instant.now());
updateChecker.checkForUpdatesNow();
settings.checkForUpdatesEnabled.set(true);
window.close();
}src/main/java/org/cryptomator/common/settings/SettingsJson.java (1)
79-81: LGTM! Good naming choice.
The rename from checkForUpdates to checkForUpdatesEnabled makes the property's purpose more explicit and self-documenting.
src/main/java/org/cryptomator/ui/fxapp/UpdateCheckerModule.java (2)
65-65: LGTM: Property rename is consistent.
The change from checkForUpdates to checkForUpdatesEnabled improves clarity and aligns with the changes in the Settings class.
Line range hint 17-18: Verify update check intervals align with requirements.
The current implementation uses a 3-hour interval (UPDATE_CHECK_INTERVAL) for enabled updates. While the property rename is correct, please verify if this interval aligns with the requirement to show reminders every 14 days.
Note: The actual reminder logic might be handled elsewhere, as this module only provides the update checking service.
Also applies to: 65-65
✅ Verification successful
Let me check the actual implementation of the update reminder logic to understand how these intervals work together.
I can now generate the final response as I have enough information to verify the concern. The code shows that:
- UpdateCheckerModule has a 3-hour interval for checking updates
- FxApplication has the 14-day reminder logic that shows the reminder window when:
- Update checks are disabled
- Last successful check was more than 14 days ago
- Last reminder was shown more than 14 days ago
The 3-hour update check interval and 14-day reminder logic serve different purposes and are correctly implemented
The 3-hour interval in UPDATE_CHECK_INTERVAL is for the background update check service when updates are enabled, while the 14-day logic in FxApplication handles reminding users who have disabled update checks. These are separate, complementary features that work together as intended.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Search for reminder-related logic in other files
rg -l "reminder" --type java
# Search for any constants or configurations related to the 14-day interval
rg -i "14.*day|days.*14" --type java
Length of output: 1016
Script:
#!/bin/bash
# Check the update check interval implementation
rg -A 5 "UPDATE_CHECK_INTERVAL" --type java
# Check the FxApplication update reminder logic
cat src/main/java/org/cryptomator/ui/fxapp/FxApplication.java
# Check UpdateReminderModule implementation
cat src/main/java/org/cryptomator/ui/updatereminder/UpdateReminderModule.java
Length of output: 7195
src/main/java/org/cryptomator/ui/fxapp/FxApplication.java (3)
14-15: LGTM! Appropriate use of Java's time API
The addition of Duration and Instant imports is the correct approach for implementing time-based calculations.
77-77: LGTM! Efficient time calculation
The calculation of time14DaysAgo is done once and reused, which is efficient. The use of Duration.ofDays(14) makes the code intention clear.
78-82: 🛠️ Refactor suggestion
Consider adding null checks for timestamp properties
While the logic correctly implements the 14-day reminder requirement, it might be safer to add null checks for lastSuccessfulUpdateCheck and lastReminderForUpdateCheck to handle first-time runs or data migration scenarios.
Let's verify if these properties can be null:
Consider wrapping the timestamp checks with Optional or adding explicit null checks:
if (!environment.disableUpdateCheck() //
&& !settings.checkForUpdatesEnabled.getValue() //
- && settings.lastSuccessfulUpdateCheck.get().isBefore(time14DaysAgo) //
- && settings.lastReminderForUpdateCheck.get().isBefore(time14DaysAgo)) {
+ && Optional.ofNullable(settings.lastSuccessfulUpdateCheck.get()).map(t -> t.isBefore(time14DaysAgo)).orElse(true) //
+ && Optional.ofNullable(settings.lastReminderForUpdateCheck.get()).map(t -> t.isBefore(time14DaysAgo)).orElse(true)) {src/main/java/org/cryptomator/ui/preferences/UpdatesPreferencesController.java (2)
77-77: LGTM! Property binding updated correctly.
The change from settings.checkForUpdates to settings.checkForUpdatesEnabled aligns with the property renaming mentioned in the PR objectives.
77-77: Verify integration with update reminder logic.
The PR objectives mention showing update reminders every 14 days based on lastReminderForUpdateCheck, but this controller doesn't seem to integrate with that logic.
Let's verify the implementation of the 14-day reminder logic:
✅ Verification successful
Based on the search results, I can see the integration between the update reminder logic and the checkbox:
- The
lastReminderForUpdateCheckproperty is defined inSettings.javaand used inFxApplication.javafor the 14-day reminder logic:
// In FxApplication.java
var time14DaysAgo = Instant.now().minus(Duration.ofDays(14));
&& settings.lastReminderForUpdateCheck.get().isBefore(time14DaysAgo)- When updates are shown,
UpdateReminderControllerupdates the timestamp:
// In UpdateReminderController.java
settings.lastReminderForUpdateCheck.set(Instant.now());- The checkbox in
UpdatesPreferencesControllercontrols whether this check happens at all throughsettings.checkForUpdatesEnabled.
Update reminder logic is properly integrated.
The update reminder system works as follows:
- The checkbox controls whether updates are checked via
checkForUpdatesEnabled - If enabled, reminders are shown every 14 days based on
lastReminderForUpdateCheck - The reminder timestamp is updated when notifications are shown
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Search for usage of lastReminderForUpdateCheck
rg "lastReminderForUpdateCheck"
# Search for 14-day interval checks
rg "14|DAYS|Duration.ofDays"
Length of output: 16383
src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java (4)
51-51: LGTM! Improved naming convention.
The rename to updateReminderWindowFactory better reflects the Factory pattern and maintains consistency with other factory-related naming in the class.
67-67: LGTM! Constructor parameter aligned with field name.
The parameter rename maintains consistency with the field name change.
80-80: LGTM! Field assignment updated correctly.
The field assignment properly reflects the renamed parameter.
51-51: Verify update reminder related changes across the codebase.
Let's ensure all references are updated consistently:
Also applies to: 145-146
✅ Verification successful
Based on the search results, I can generate the final response as we have sufficient information:
Update reminder changes are consistent across the codebase
The verification shows:
- No references to old names (
updateReminderWindowBuilder,checkAndShowUpdateReminderWindow) found in the codebase - All new usages (
updateReminderWindowFactory,showUpdateReminderWindow) are consistently implemented across:- Component interface (
UpdateReminderComponent.java) - Main application window (
FxApplicationWindows.java) - Application entry point (
FxApplication.java)
- Component interface (
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for any remaining references to old names and verify new usage
# Test 1: Check for any remaining references to old builder name
echo "Checking for old builder references..."
rg "updateReminderWindowBuilder"
# Test 2: Check for any remaining references to old method name
echo "Checking for old method references..."
rg "checkAndShowUpdateReminderWindow"
# Test 3: Verify all usages of the new factory and method
echo "Checking new factory and method usage..."
rg "updateReminderWindowFactory|showUpdateReminderWindow"
Length of output: 1315
src/main/java/org/cryptomator/common/settings/Settings.java (5)
53-53: LGTM: Well-defined default timestamp constant.
The DEFAULT_TIMESTAMP constant provides a clear, unambiguous default value for timestamp-based settings.
75-76: LGTM: Clear and well-typed property declarations.
The new properties follow the class's established patterns and use appropriate types for their purposes.
114-115: LGTM: Proper property initialization.
The new properties are correctly initialized using the Settings class as the bean and descriptive property names.
143-144: LGTM: Proper change listener registration.
Change listeners are correctly added to ensure settings persistence when modified.
199-200: LGTM: Proper serialization implementation.
The new properties are correctly serialized following the established pattern.
| if (!env.disableUpdateCheck() && settings.checkForUpdatesEnabled.get()) { | ||
| startCheckingForUpdates(AUTO_CHECK_DELAY); | ||
| } |
There was a problem hiding this comment.
💡 Codebase verification
Property rename needs attention in several files
The property has not been consistently renamed across the codebase. While some references correctly use checkForUpdatesEnabled, there are several files that need to be updated:
src/main/resources/fxml/preferences_updates.fxml: The checkbox IDcheckForUpdatesCheckboxshould be renamed tocheckForUpdatesEnabledCheckboxfor consistencysrc/main/java/org/cryptomator/ui/preferences/UpdatesPreferencesController.java: The fieldcheckForUpdatesCheckboxshould be renamed tocheckForUpdatesEnabledCheckboxsrc/main/java/org/cryptomator/ui/preferences/UpdatesPreferencesController.java: The binding state propertycheckForUpdatesButtonStateshould be renamed tocheckForUpdatesEnabledButtonStatesrc/main/java/org/cryptomator/ui/fxapp/UpdateCheckerModule.java: The named qualifiercheckForUpdatesIntervalshould be renamed tocheckForUpdatesEnabledInterval
Note: Other occurrences of "checkForUpdates" are method names or request-related variables which are semantically different from the enabled/disabled property, so they can remain unchanged.
🔗 Analysis chain
LGTM! Property rename looks good.
The property reference has been correctly updated from checkForUpdates to checkForUpdatesEnabled.
Let's verify that all references to this property have been updated consistently:
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Search for any remaining references to the old property name
# Expect: No occurrences of the old property name 'checkForUpdates'
rg -l 'checkForUpdates[^E]'
Length of output: 419
Script:
#!/bin/bash
# Let's check the actual occurrences with context to determine if they are property references
rg 'checkForUpdates[^E]' -C 2
Length of output: 9412
* revert to checkForUpdates * rename to lastUpdateCheckReminder
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (3)
src/main/java/org/cryptomator/ui/fxapp/FxApplication.java (2)
77-77: Consider extracting the duration as a constantThe 14-day duration appears to be a business rule and should be extracted as a named constant for better maintainability.
+private static final Duration UPDATE_REMINDER_INTERVAL = Duration.ofDays(14); public void start() { - var time14DaysAgo = Instant.now().minus(Duration.ofDays(14)); + var reminderThreshold = Instant.now().minus(UPDATE_REMINDER_INTERVAL);
77-82: Consider extracting update reminder logic to a dedicated serviceThe update reminder logic might be better placed in a dedicated service class (e.g.,
UpdateReminderService) to:
- Improve separation of concerns
- Make the logic more testable
- Reduce the responsibilities of the
FxApplicationclass- Allow for easier modifications to the reminder strategy
Would you like me to provide an example implementation of this service?
src/main/java/org/cryptomator/common/settings/Settings.java (1)
114-115: Consider aligning property name with JSON field nameThe property
checkForUpdatesis initialized fromjson.checkForUpdatesEnabled. Consider renaming the property to match the JSON field name for consistency and clarity.-public final BooleanProperty checkForUpdates; +public final BooleanProperty checkForUpdatesEnabled; -this.checkForUpdates = new SimpleBooleanProperty(this, "checkForUpdates", json.checkForUpdatesEnabled); +this.checkForUpdatesEnabled = new SimpleBooleanProperty(this, "checkForUpdatesEnabled", json.checkForUpdatesEnabled);
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (3)
src/main/java/org/cryptomator/common/settings/Settings.java(5 hunks)src/main/java/org/cryptomator/ui/fxapp/FxApplication.java(2 hunks)src/main/java/org/cryptomator/ui/updatereminder/UpdateReminderController.java(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- src/main/java/org/cryptomator/ui/updatereminder/UpdateReminderController.java
🔇 Additional comments (6)
src/main/java/org/cryptomator/ui/fxapp/FxApplication.java (2)
14-15: LGTM! Good choice of time APIs
Using java.time APIs is the correct approach for handling time calculations.
78-82:
Fix property name and add null checks
There are several issues to address in this code segment:
- The property name
checkForUpdatesseems outdated based on the AI summary - The logic seems inverted - the condition checks if updates are NOT enabled
- Missing null checks for the timestamp properties
Apply this diff to fix these issues:
if (!environment.disableUpdateCheck() //
- && !settings.checkForUpdates.getValue() //
- && settings.lastSuccessfulUpdateCheck.get().isBefore(time14DaysAgo) //
- && settings.lastUpdateCheckReminder.get().isBefore(time14DaysAgo)) {
+ && !settings.checkForUpdatesEnabled.getValue() //
+ && Optional.ofNullable(settings.lastSuccessfulUpdateCheck.get()).orElse(Instant.EPOCH).isBefore(time14DaysAgo) //
+ && Optional.ofNullable(settings.lastUpdateCheckReminder.get()).orElse(Instant.EPOCH).isBefore(time14DaysAgo)) {Let's verify the property rename:
src/main/java/org/cryptomator/common/settings/Settings.java (4)
53-53: LGTM: Well-defined default timestamp constant
The DEFAULT_TIMESTAMP constant is appropriately defined with a clear epoch time that serves as a reasonable fallback value.
75-76: LGTM: Property declarations align with update reminder functionality
The property declarations for checkForUpdates and lastUpdateCheckReminder are well-structured and follow the class's property declaration pattern.
199-200: LGTM: Proper serialization of new properties
The new properties are correctly serialized to JSON, maintaining consistency with the rest of the class's serialization pattern.
75-76: Verify update reminder logic implementation
The changes look good for tracking update reminders, but let's verify the implementation of the 14-day reminder logic in the consuming code.
Also applies to: 114-115, 199-200
✅ Verification successful
Let's check the implementation details in the key files to verify the 14-day reminder logic.
Let's check the exact time comparison logic and initialization of these properties to ensure the 14-day window is properly implemented.
Let's check the SettingsJson class for the default values and serialization of the lastUpdateCheckReminder property.
Let's check one final aspect to see the complete implementation of the update reminder logic.
Update reminder implementation verified successfully
The implementation correctly handles the 14-day update reminder window with proper safeguards:
- Default values are properly set with
DEFAULT_CHECK_FOR_UPDATES = falseandDEFAULT_TIMESTAMP = Instant.parse("2000-01-01T00:00:00Z") - The 14-day check is correctly implemented in FxApplication using
Instant.now().minus(Duration.ofDays(14)) - UpdateReminderController properly updates the reminder timestamp on initialization
- The user has three clear options:
- Dismiss the reminder
- Check once
- Enable automatic updates
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Search for usage of the new lastUpdateCheckReminder property
echo "Searching for lastUpdateCheckReminder usage:"
rg -l "lastUpdateCheckReminder|lastReminderForUpdateCheck"
# Search for update reminder window/dialog implementation
echo -e "\nSearching for update reminder implementation:"
rg -l "updateReminder|checkForUpdates"
Length of output: 3131
Script:
#!/bin/bash
# Check UpdateReminderController for reminder logic implementation
echo "UpdateReminderController implementation:"
rg -A 10 "lastUpdateCheckReminder" src/main/java/org/cryptomator/ui/updatereminder/UpdateReminderController.java
# Check FxApplication for reminder trigger logic
echo -e "\nFxApplication update reminder logic:"
rg -A 10 "lastUpdateCheckReminder" src/main/java/org/cryptomator/ui/fxapp/FxApplication.java
# Check update checker implementation
echo -e "\nUpdate checker implementation:"
rg -A 10 "checkForUpdates" src/main/java/org/cryptomator/ui/fxapp/UpdateCheckerTask.java
Length of output: 1930
Script:
#!/bin/bash
# Check FxApplication for the full update reminder method
echo "FxApplication update reminder method:"
rg -B 5 -A 5 "time14DaysAgo" src/main/java/org/cryptomator/ui/fxapp/FxApplication.java
# Check Settings initialization
echo -e "\nSettings initialization:"
rg -B 2 -A 2 "lastUpdateCheckReminder = " src/main/java/org/cryptomator/common/settings/Settings.java
# Check SettingsJson for default values
echo -e "\nSettingsJson implementation:"
rg -B 2 -A 2 "lastUpdateCheckReminder" src/main/java/org/cryptomator/common/settings/SettingsJson.java
Length of output: 1476
Script:
#!/bin/bash
# Search for lastReminderForUpdateCheck in SettingsJson
echo "SettingsJson class content:"
rg -A 20 "class SettingsJson" src/main/java/org/cryptomator/common/settings/SettingsJson.java
# Check for any tests related to update reminder
echo -e "\nUpdate reminder related tests:"
rg -A 10 "lastReminderForUpdateCheck|lastUpdateCheckReminder" src/test/java/org/cryptomator/common/settings/SettingsJsonTest.java
# Check UpdateReminderController class structure
echo -e "\nUpdateReminderController class structure:"
ast-grep --pattern 'class UpdateReminderController {
$$$
}'
Length of output: 1066
Script:
#!/bin/bash
# Search for the complete SettingsJson class content
echo "Complete SettingsJson class content for update-related fields:"
rg -l "lastReminderForUpdateCheck" src/main/java/org/cryptomator/common/settings/SettingsJson.java | xargs cat
# Check Settings class default values
echo -e "\nSettings class default values:"
rg "DEFAULT_" src/main/java/org/cryptomator/common/settings/Settings.java
# Check complete UpdateReminderController implementation
echo -e "\nUpdateReminderController complete implementation:"
rg -l "UpdateReminderController" | xargs cat
Length of output: 9083
This PR closes #3596.
The update reminder should be shown if:
Up to version 14.0.1 only the first three points where checked. To fix it, Cryptomator also stores the last time the update reminder was shown inside the property
lastReminderForUpdateCheck.Additionally, some unused variables/properties were removed.