club_update
Razmig Sarkissian 1 year ago
parent d563f2f65f
commit 462620cb31
  1. 2
      PadelClub/Views/Match/MatchSummaryView.swift
  2. 1
      PadelClub/Views/Navigation/MainView.swift
  3. 3
      PadelClub/Views/ViewModifiers/DeferredViewModifier.swift

@ -54,7 +54,7 @@ struct MatchSummaryView: View {
if let roundTitle { if let roundTitle {
Text(roundTitle).fontWeight(.semibold) Text(roundTitle).fontWeight(.semibold)
} }
if match.index > 0 { if match.groupStage != nil || match.index > 0 {
Text(matchTitle) Text(matchTitle)
} }
} }

@ -139,6 +139,7 @@ struct MainView: View {
if importingFiles { if importingFiles {
HStack(spacing: 20) { HStack(spacing: 20) {
ProgressView() ProgressView()
.progressViewStyle(CircularProgressViewStyle(tint: Color.black))
if let mostRecentDateAvailable = SourceFileManager.shared.mostRecentDateAvailable { if let mostRecentDateAvailable = SourceFileManager.shared.mostRecentDateAvailable {
if mostRecentDateAvailable > SourceFileManager.shared.lastDataSourceDate() ?? .distantPast { if mostRecentDateAvailable > SourceFileManager.shared.lastDataSourceDate() ?? .distantPast {
Text("import " + mostRecentDateAvailable.monthYearFormatted) Text("import " + mostRecentDateAvailable.monthYearFormatted)

@ -24,13 +24,11 @@ import SwiftUI
/// Stack Overflow, see https://stackoverflow.com/a/74765430/1558022 /// Stack Overflow, see https://stackoverflow.com/a/74765430/1558022
/// ///
private struct DeferredViewModifier: ViewModifier { private struct DeferredViewModifier: ViewModifier {
@Environment(\.colorScheme) var colorScheme
let delay: DispatchTimeInterval let delay: DispatchTimeInterval
func body(content: Content) -> some View { func body(content: Content) -> some View {
_content(content) _content(content)
.foregroundStyle(colorScheme == .light ? .white : .black)
.onAppear { .onAppear {
DispatchQueue.main.asyncAfter(deadline: .now() + delay) { DispatchQueue.main.asyncAfter(deadline: .now() + delay) {
self.shouldHide = true self.shouldHide = true
@ -54,6 +52,7 @@ extension View {
func toastFormatted() -> some View { func toastFormatted() -> some View {
self self
.font(.title3) .font(.title3)
.foregroundStyle(.black)
.frame(height: 28) .frame(height: 28)
.padding() .padding()
.background { .background {

Loading…
Cancel
Save