summaryrefslogtreecommitdiff
path: root/src/displayapp/screens/ScreenList.h
diff options
context:
space:
mode:
authorSimon Willshire <me@simonwillshire.com>2022-05-19 13:59:09 -0400
committerJF <JF002@users.noreply.github.com>2022-06-28 18:50:10 +0200
commit2c75e7aad8aa8d7b50dd3ea795bdc2938992aa69 (patch)
treeb0ab8bc1c68008c6cef9eb421d8d087a7d5145cc /src/displayapp/screens/ScreenList.h
parente77d47e35c84e2942f689fd2a810bda0b7dce625 (diff)
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>
Diffstat (limited to 'src/displayapp/screens/ScreenList.h')
0 files changed, 0 insertions, 0 deletions