mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-20 08:32:53 +02:00
Use offsets for the carousel instead of a page view.
Fix carousel for RTL layouts.
This commit is contained in:
+11
@@ -18,11 +18,22 @@ import SwiftUI
|
||||
|
||||
@available(iOS 14.0, *)
|
||||
struct OnboardingSplashScreenPageIndicator: View {
|
||||
|
||||
@Environment(\.theme) private var theme
|
||||
|
||||
let pageCount: Int
|
||||
let pageIndex: Int
|
||||
|
||||
internal init(pageCount: Int, pageIndex: Int) {
|
||||
self.pageCount = pageCount
|
||||
|
||||
if pageIndex == -1 {
|
||||
self.pageIndex = pageCount - 1
|
||||
} else {
|
||||
self.pageIndex = pageIndex % pageCount
|
||||
}
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
HStack {
|
||||
ForEach(0..<pageCount) { index in
|
||||
|
||||
Reference in New Issue
Block a user