-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Improve Profile Switch Negative Timeshift and string for Wear Loop State #3784
Merged
MilosKozak
merged 6 commits into
nightscout:dev
from
olorinmaia:wear_fix_negative_timeshift
Feb 5, 2025
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
7178ab6
Improve Profile Switch Negative Timeshift and string for Wear Loop State
olorinmaia 9a3e2d9
Wear: Fix typo and improve profile switch string.
olorinmaia f6dcf49
Use MIN/MAX values from Constants for Timeshift
olorinmaia be4a557
Adjust profile_message string for wear
olorinmaia 4ff618f
Minor adjustment to show only profile name
olorinmaia 8887f1a
use Constants in wear ProfileSwitchActivity also
olorinmaia File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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'd be afraid to remove this. it makes timeshit always positive value. I'm not sure what will happen elsewhere ....
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.
Thanks for feedback!
Profile switch in wear checks phone what current timeshift and percentage is. So if f.ex. a - 2h timeshift and 120% profile is set in phone it automatically preselect these values in wear app when using wear profile switch button.
Problem is when a negative timeshift is set on phone, with this line of code, wear app adds +24h to the -2h from phone and displays +22h instead which is wrong.
I don't know if there is any way to avoid this except removing it, limits are set to -23/+23 so user can't enter higher or lower?
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.
https://photos.app.goo.gl/zrK67L8z3iDeyMvz6
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.
if (timeshift < 0) timeshift += 24
This was ensuring the timeshift remained in a 0-23 range, but it's no longer needed if we go for aligning phone/wear range.