-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(sync): set device name with random string at the end #121
Conversation
constructor (props) { | ||
super(props) | ||
// recreate this as little as possible | ||
this._deviceName = this._deviceName || "Android " + crypto.randomBytes(2).toString('hex').slice(0, 3); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is intended to make sure the device name doesn't change every time you open/close sync, not sure if this is the best way to do it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I switched to generate this once during the lifecycle of the app
FYI whenever the constructor is called, this._deviceName would always be undefined, since it's only called when creating a new instance.
<TouchableNativeFeedback onPress={onPress}> | ||
<View style={styles.wifiBar}> | ||
<WifiIcon /> | ||
<Text style={styles.wifiBarText}> | ||
<Text style={styles.bold}>Wi-Fi:</Text> {ssid} | ||
<Text style={styles.bold}>Wi-Fi:</Text> {ssid}, {deviceName} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how do we want to display the device name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a good place to put it. Just tweaked formatting
No description provided.