mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
Fix time zone picker in the schedule meeting fragment
This commit is contained in:
parent
ff8fb2d179
commit
64a72c0704
1 changed files with 15 additions and 8 deletions
|
|
@ -171,6 +171,7 @@ struct ScheduleMeetingFragment: View {
|
|||
.default_text_style_500(styleSize: 15)
|
||||
Text(": \(meetingViewModel.selectedTimezone.formattedString())")
|
||||
.fontWeight(.bold)
|
||||
.lineLimit(1)
|
||||
.default_text_style_500(styleSize: 15)
|
||||
.onTapGesture {
|
||||
showTimeZonePicker.toggle()
|
||||
|
|
@ -363,15 +364,21 @@ struct ScheduleMeetingFragment: View {
|
|||
GeometryReader { geometry in
|
||||
ScrollViewReader { proxyReader in
|
||||
List(0..<meetingViewModel.knownTimezones.count, id: \.self) { idx in
|
||||
Text(TimeZone.init(identifier: meetingViewModel.knownTimezones[idx])?.formattedString() ?? "Unknown timezone")
|
||||
.fontWeight(meetingViewModel.selectedTimezoneIdx == idx ? Font.Weight.bold : Font.Weight.regular)
|
||||
.onTapGesture {
|
||||
if let timeZone = TimeZone.init(identifier: meetingViewModel.knownTimezones[idx]) {
|
||||
meetingViewModel.selectedTimezoneIdx = idx
|
||||
meetingViewModel.updateTimezone(timeZone: timeZone)
|
||||
}
|
||||
HStack {
|
||||
Text(TimeZone.init(identifier: meetingViewModel.knownTimezones[idx])?.formattedString() ?? "Unknown timezone")
|
||||
.fontWeight(meetingViewModel.selectedTimezoneIdx == idx ? Font.Weight.bold : Font.Weight.regular)
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
}
|
||||
.contentShape(Rectangle())
|
||||
.onTapGesture {
|
||||
if let timeZone = TimeZone.init(identifier: meetingViewModel.knownTimezones[idx]) {
|
||||
meetingViewModel.selectedTimezoneIdx = idx
|
||||
meetingViewModel.updateTimezone(timeZone: timeZone)
|
||||
showTimeZonePicker = false
|
||||
}
|
||||
.id(idx)
|
||||
}
|
||||
.id(idx)
|
||||
.background(.white)
|
||||
}
|
||||
.frame(width: geometry.size.width - 30, height: 300)
|
||||
.cornerRadius(20)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue