field_ios

In-the-field app for Radroots on iOS
git clone https://radroots.dev/git/field_ios.git
Log | Files | Refs | README | LICENSE

TeraTodayPagingStatusView.swift (733B)


      1 import SwiftUI
      2 
      3 struct TeraTodayPagingStatusView: View {
      4   @ObservedObject var store: TeraTodayStore
      5 
      6   var body: some View {
      7     VStack(alignment: .leading, spacing: 8) {
      8       TeraTodayStatusView(presentation: store.presentation)
      9       if store.hasPendingContent {
     10         Text("Posts have changed. Refresh to see the latest posts.")
     11           .font(.subheadline)
     12       }
     13       if store.hasPendingContent || store.presentation.readFailure?.requiresRefresh == true {
     14         Button("Refresh posts") { Task { await store.reload() } }
     15           .buttonStyle(.bordered)
     16           .frame(minHeight: 44)
     17           .accessibilityHint("Loads the latest posts.")
     18           .accessibilityIdentifier("tera.today.restart")
     19       }
     20     }
     21   }
     22 }