mirror of
https://github.com/yattee/yattee.git
synced 2025-04-27 23:40:35 +05:30
Add refresh buttons keyboard shortcuts
This commit is contained in:
parent
3495ecf693
commit
9304bf6158
@ -122,6 +122,12 @@ struct TrendingView: View {
|
|||||||
.frame(minWidth: 400, minHeight: 400)
|
.frame(minWidth: 400, minHeight: 400)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
.background(
|
||||||
|
Button("Refresh") {
|
||||||
|
resource.load()
|
||||||
|
}
|
||||||
|
.keyboardShortcut("r")
|
||||||
|
)
|
||||||
.navigationTitle("Trending")
|
.navigationTitle("Trending")
|
||||||
#endif
|
#endif
|
||||||
#if os(iOS)
|
#if os(iOS)
|
||||||
|
@ -30,6 +30,14 @@ struct PopularView: View {
|
|||||||
FavoriteButton(item: FavoriteItem(section: .popular))
|
FavoriteButton(item: FavoriteItem(section: .popular))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#if !os(tvOS)
|
||||||
|
.background(
|
||||||
|
Button("Refresh") {
|
||||||
|
resource?.load()
|
||||||
|
}
|
||||||
|
.keyboardShortcut("r")
|
||||||
|
)
|
||||||
|
#endif
|
||||||
#if os(iOS)
|
#if os(iOS)
|
||||||
.refreshControl { refreshControl in
|
.refreshControl { refreshControl in
|
||||||
resource?.load().onCompletion { _ in
|
resource?.load().onCompletion { _ in
|
||||||
|
@ -38,6 +38,14 @@ struct SubscriptionsView: View {
|
|||||||
FavoriteButton(item: FavoriteItem(section: .subscriptions))
|
FavoriteButton(item: FavoriteItem(section: .subscriptions))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#if !os(tvOS)
|
||||||
|
.background(
|
||||||
|
Button("Refresh") {
|
||||||
|
loadResources(force: true)
|
||||||
|
}
|
||||||
|
.keyboardShortcut("r")
|
||||||
|
)
|
||||||
|
#endif
|
||||||
#if os(iOS)
|
#if os(iOS)
|
||||||
.navigationBarTitleDisplayMode(RefreshControl.navigationBarTitleDisplayMode)
|
.navigationBarTitleDisplayMode(RefreshControl.navigationBarTitleDisplayMode)
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user