Skip to content

Conversation

@nev-al
Copy link
Contributor

@nev-al nev-al commented Sep 7, 2025

Description

Add preferences.commit() call to save pre-shared key correctly and show user feedback via Toast messages.

Related Issue

Closes #78

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

@pappz
Copy link
Collaborator

pappz commented Sep 10, 2025

@nev-al Thank you for the PR. Please provide a summary for the PR message.

@nev-al
Copy link
Contributor Author

nev-al commented Sep 11, 2025

I'm sorry, @pappz. I edited the first message.

try {
preferences.setPreSharedKey(key);
preferences.commit();
Toast.makeText(context, "Pre-shared key saved successfully", Toast.LENGTH_SHORT).show();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please move the string to strings.xml value file

preferences.commit();
Toast.makeText(context, "Pre-shared key saved successfully", Toast.LENGTH_SHORT).show();
} catch (Exception e) {
Log.e(LOGTAG, "Failed to save pre-shared key", e);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please move the string to strings.xml value file

@pappz pappz merged commit 62861bf into netbirdio:main Sep 13, 2025
1 check passed
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.

[Bug] Impossible to save a preshared key

2 participants