mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-19 16:13:42 +02:00
Fix drag sutters and enable swipe to pop gesture.
Add docs and last tweaks following a self review. Add constants for max content size and disable splash screen via build settings.
This commit is contained in:
@@ -64,10 +64,13 @@ class OnboardingSplashScreenViewModel: OnboardingSplashScreenViewModelType, Onbo
|
||||
case .viewAction(let viewAction):
|
||||
switch viewAction {
|
||||
case .nextPage:
|
||||
// Wrap back round to the first page index when reaching the end.
|
||||
state.bindings.pageIndex = (state.bindings.pageIndex + 1) % state.content.count
|
||||
case .previousPage:
|
||||
// Prevent the hidden page at index -1 from being shown.
|
||||
state.bindings.pageIndex = max(0, (state.bindings.pageIndex - 1))
|
||||
case .hiddenPage:
|
||||
// Hidden page for a nicer animation when looping back to the start.
|
||||
state.bindings.pageIndex = -1
|
||||
case .login, .register:
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user