-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Event log access from MegaStatus menu #2159
base: master
Are you sure you want to change the base?
Event log access from MegaStatus menu #2159
Conversation
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 figured I might as well change it while I was already there, but there are some efficiency improvements in there as well.
In theory, I actually prefer a switch-case for the whole function (replacing the 'if' statements), because I feel it's cleaner syntax when you're just checking the id against a bunch of different options. I figured it was better to go with the future-proof format though. |
If they're going to be fussy about resource id's (and I don't know why the integer can't be used in a switch statement) then wouldn't it be better just to use the |
Enabling the overflow menu in MegaStatus, and adding a link to view the event log. This was based on the following discussion/request: NightscoutFoundation#2128
1328808
to
f758022
Compare
c0c8f38
to
f758022
Compare
Ok, I've moved the refactoring out of this PR; it just includes the new menu item now. PR with the refactoring coming momentarily. |
This PR is based on the following discussion/request: #2128
it enables the dropdown menu for MegaStatus, and adds a link to the event log, just like in the Home activity.

***UPDATE: I've removed the following refactoring part and put it in its own PR: #2293
I also did a bit of refactoring in Home.java->onOptionsItemSelected(), based on the following linting advice:

I got rid of the initial switch-case and converted everything into one big if-else-if statement.