Skip to content

Conversation

@steve1rm
Copy link
Owner

…manual sync.

Key changes:

  • In SettingsViewModel, after a successful manual sync:
    • Saved the selected sync interval from the UI state to the user's preferences.
    • Saved the current timestamp as the last sync time to the user's preferences.
    • Updated the UI to display "Just now" as the last sync time.

…manual sync.

Key changes:
- In `SettingsViewModel`, after a successful manual sync:
    - Saved the selected sync interval from the UI state to the user's preferences.
    - Saved the current timestamp as the last sync time to the user's preferences.
    - Updated the UI to display "Just now" as the last sync time.
@steve1rm steve1rm requested review from Copilot and rainxchzed July 28, 2025 20:19
@steve1rm steve1rm self-assigned this Jul 28, 2025
@steve1rm steve1rm merged commit 9868ccf into master Jul 28, 2025
1 check passed
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Updates the manual sync functionality to properly save user preferences and sync timestamp after a successful sync operation. This ensures the user's selected sync interval and last sync time are persisted to maintain consistency between UI state and stored user data.

  • Saves the selected sync interval from UI state to user preferences after successful sync
  • Records the current timestamp as the last sync time in user preferences
  • Updates UI to show "Just now" as the last sync time and removes outdated comment


userRepository.saveUser(
User(
userName = noteMarkPreferences.getUserName()!!,
Copy link

Copilot AI Jul 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using the null assertion operator (!!) on getUserName() could cause a runtime crash if the username is null. Consider using a safe call or providing a default value.

Suggested change
userName = noteMarkPreferences.getUserName()!!,
userName = noteMarkPreferences.getUserName() ?: "Unknown User",

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants