Skip to content

Conversation

@Efe-Cal
Copy link
Contributor

@Efe-Cal Efe-Cal commented Feb 3, 2026

This pull request improves device registration logic in the settings view and refactors related code to enhance maintainability and reliability. The main focus is to ensure that the current device is registered if it is missing and to centralize device registration logic in a reusable function.

Device registration improvements:

  • Added a new registerCurrentDevice function in encryption.ts to handle registering the current device with the server, generating a passkey, saving the device locally, and syncing device storage.
  • Updated getCurrentDevice in encryption.ts to delegate device registration to the new registerCurrentDevice function, reducing code duplication and improving maintainability.

Settings view enhancements:

  • Modified SettingsView in SettingsView.tsx to check if the current device is missing from local storage, and if so, register it using the new registerCurrentDevice function before updating the device list.
  • Imported registerCurrentDevice in SettingsView.tsx to support the new device registration logic.

fixes #132

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.

Device passkey is 000 000 if no timelapse was created on said device

1 participant