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 {
Text(roundTitle).fontWeight(.semibold)
}
if match.index > 0 {
if match.groupStage != nil || match.index > 0 {
Text(matchTitle)
}
}

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

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

Loading…
Cancel
Save