InfiniTime/src/components
Simon Willshire 2c75e7aad8 Dismiss notifications by swiping right
Add a new interface `NotificationManager::Dismiss(id)` to delete a
notification with the specified `id`.

The animate the notification dismiss the `RightAnim` transition to a
black screen is used. After the dismiss the new message is swiped in
from below or above.

If we dismiss the oldest message (when we are at 5/5, or 3/3), then the
new message after a dismiss should appear to come from below.

Otherwise (when we are at 2/3) the new message after a dismiss should
appear to come from above.

Rework the index code to show the index of the currently viewed
notification. Instead of calculating the index relative to the oldest
`id` introduce a new interface `NotificationManager::IndexOf(id)`. This
is done because the `id` of the notifications in the buffer aren't
continuous anymore (as some messages could have been dismissed).

Rework notification ring buffer to have a beginIdx and a size
internally to make the dismissal of notifications easier.

Fixes: https://github.com/InfiniTimeOrg/InfiniTime/issues/176

Co-authored-by: Simon Willshire <me@simonwillshire.com>
Co-authored-by: Reinhold Gschweicher <pyro4hell@gmail.com>
2022-06-28 18:50:10 +02:00
..
alarm Switch to freertos timers (#1095) 2022-06-06 17:47:43 +02:00
battery Switched to non-deprecated math header 2021-12-04 22:03:40 +02:00
ble Dismiss notifications by swiping right 2022-06-28 18:50:10 +02:00
brightness Remove backup brightness feature (#1180) 2022-06-18 12:54:41 +03:00
datetime Apply clang-format to all C++ files 2022-06-05 09:15:46 +03:00
firmwarevalidator Update includes to to be relative to src directory 2021-11-15 22:02:49 +01:00
fs Apply clang-format to all C++ files 2022-06-05 09:15:46 +03:00
gfx Update includes to to be relative to src directory 2021-11-15 22:02:49 +01:00
heartrate Manual squash merge of PR #932 (https://github.com/InfiniTimeOrg/InfiniTime/pull/932) from 13werwolf13 (https://github.com/13werwolf13). This PR adds a new Terminal watchface to InfiniTime! 2022-02-20 13:20:43 +01:00
motion Fix crash upon leaving app. 2022-01-04 02:00:03 +00:00
motor Switch to freertos timers (#1095) 2022-06-06 17:47:43 +02:00
rle Update includes to to be relative to src directory 2021-11-15 22:02:49 +01:00
settings Apply clang-format to all C++ files 2022-06-05 09:15:46 +03:00
timer Fix assertion failure in TimerController 2022-05-27 22:14:28 +03:00