GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||
GeezerVison is showing github.com — notifications: Dismiss to watchface when empty by eliedrian · Pull Request #1716 · InfiniTimeOrg/InfiniTime Conversation
Contributor
I found it slightly annoying that dismissing all notifications leaves me with a "No notification to display" message. Instead of dismissing to a relatively useless message, dismiss to watchface.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
|
There was an error while loading. Please reload this page.
|
Build checks have not completed. Possible reasons for this are:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This seems like an interesting idea. The animation isn't working as I'd expect though. I expect the sideways dismiss animation to go to a black screen and then slide up to the watch face.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| } else if (mode == Modes::Preview && dismissingNotification) { | ||
| running = false; | ||
| currentItem = std::make_unique<NotificationItem>(alertNotificationService, motorController); |
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I guess this line has been deleted because it isn't necessary. Can you confirm the intent?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
That's right. No longer necessary. running is set to false. Previously, currentItem would be populated with the "No notifications to display" notification item.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Well this is for the preview mode, so I believe it's not exactly necessary for this change. It should be explained in the commit description.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
| running = currentItem->IsRunning() && running; | ||
| running = running && currentItem->IsRunning(); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This change isn't necessary.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I think this is safer. Setting running to false implies we're ending the screen. It'd be a waste to create an item to assign to currentItem when we're ending anyway.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Oh I see. I didn't realize that currentItem is left a nullptr in another function, and removing line 116 means it stays nullptr. Looks like this is more of an issue with code clarity. You should squash the fixup commits and explain these things in the commit message.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Also addressed the strange animation. Earlier, screen was flagged to be killed without the animation occurring. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
3c734a0 to
b49a84d
Compare
|
Squashed. Also updated the comment instead of fully removing it. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Oh, thank you so much, I've been wanting a feature like this for so long! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
commit 5a07821 Author: Eli Tan <[email protected]> Date: Thu Mar 30 15:43:05 2023 +0800 notifications: Dismiss to watchface when empty Set `running` to false to flag end of watchface when there are no more notifications left to display. notifications: Update now inaccurate comment notifications: Fix `currentItem` possibly being null Consequentially, `currentItem` can be left null when `running` is set to false. This is fine. The notifications screen is ending anyway. notifications: Delay ending screen for dismiss animation notifications: End screen when item is not valid
commit 5a07821 Author: Eli Tan <[email protected]> Date: Thu Mar 30 15:43:05 2023 +0800 notifications: Dismiss to watchface when empty Set `running` to false to flag end of watchface when there are no more notifications left to display. notifications: Update now inaccurate comment notifications: Fix `currentItem` possibly being null Consequentially, `currentItem` can be left null when `running` is set to false. This is fine. The notifications screen is ending anyway. notifications: Delay ending screen for dismiss animation notifications: End screen when item is not valid
|
Have been daily driving this for months, zero issues |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Are there any outstanding issues preventing this from being merged? To me this is an easy usability improvement and as far as I can see all review comments have been addressed |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Set `running` to false to flag end of watchface when there are no more notifications left to display. notifications: Update now inaccurate comment notifications: Fix `currentItem` possibly being null Consequentially, `currentItem` can be left null when `running` is set to false. This is fine. The notifications screen is ending anyway. notifications: Delay ending screen for dismiss animation notifications: End screen when item is not valid
|
Yes, anything lacking from this? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
One more voice in support of this PR being merged :) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
looking good. I like the feature
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.