-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Dismiss Notifications (Swipe right) #1150
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
Dismiss Notifications (Swipe right) #1150
Conversation
Riksu9000
left a comment
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.
Usually a PR should be focused on one topic or a single feature for example. Some of the changes here should be split off to at least one more PR.
7d32deb to
1a3d340
Compare
No problem, I have made this PR into the notifications dismissal and now creating the other watch face related one (here: #1151) |
|
I found a bug: pt_notif_dismiss_bug.mp4 |
|
Nice catch, taking a look at this now. Thanks @Itai-Nelken I have pushed a further change below which fixed an issue with the array assignment when dismissing. I think this should fix your issue with blank notifications. |
|
Happened for me in InfiniSim (create a notification, swipe it away, go back to watchface, swipe down to get to notifications, see total counter is still counted up) with your fix it doesn't happen on InfiniSim anymore |
- Cleaned up animation delay value (one place to configure in header)
NeroBurner
left a comment
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.
didn't get through all of it, but ran out of time. Submitting notes up until now
|
Mostly fixed. Now if I send 5 notifications and then dismiss them all, same thing happens. |
|
Found a complication, which needs to be handled: The
|
- Not very pretty, but it seems to work well: reassign id's after removing a notification in order to preserve index calculation for GetPrevious and GetNext. - Fix index jumping after dismissal, only use GetPrevious or GetLastNotification calls after dismiss.
I think I've fixed this now in my latest commit. Sad news, it's really not the nicest work around. As you've also pointed out, it uses a ring buffer, which means the tail and head are shifting about and indexes and the indexes that are displayed for each notification depends on an ever increasing id. In addition the EDIT: |
- Try to use more LV_HOR_RES / LV_VER_RES where applicable in place of magic 240's - Revert page to lv_container as the styling parts were not working with LV_PAGE_PART_BG (background colour, padding, border etc.).
|
Works well for me. |
Having a go at this... This is tripping me up quite a bit! It seems that:
In order to fix this, I need to be able to dismiss based on readIndex's position, not just from dismissed element to end of array... I think. Cooking something up... If anyone has any ideas, let me know! |
|
I've created a SmallRingBuffer class to hide the ringbuffer index handling inside. And outside the index from 0 to 4 can be requested. You're welcome to test it :)
edit: cleaned up: NeroBurner@ef0facf |
|
@Tiggilyboo I liked the swipe to dismiss feature so much I opened a new PR #1173 with the code from this PR, rebased it and added the ring-buffer rework. Is it ok for you to move to the new PR, or would you like to update this PR instead and champion the changes yourself? Either one is fine by me, I just want the notification dismissal feature 😁 |
Yeah for sure get it merged, afk this weekend otherwise I would. Thanks for the ring buffer fixes! |
|
You're very welcome! :) Then I'm closing this PR in favor of my new one. |




Hello all,
I've implemented dismissal of a notification by swiping right on each. This triggers an animation which throws the animation offscreen, then renders the next available notification.