Skip to content

Commit 7506d27

Browse files
committed
feat: tvOS add support refresh via play/pause key
1 parent 41bfb54 commit 7506d27

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

V2exOSTV/Views/TopicListView.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,14 @@ struct TopicListView: View {
3737
await loadData()
3838
}
3939
}
40+
.onPlayPauseCommand {
41+
Task {
42+
topics = nil
43+
page = 1
44+
selectedTopic = nil
45+
await loadData()
46+
}
47+
}
4048
}
4149

4250
func loadData(page: Int = 1) async {
@@ -49,6 +57,7 @@ struct TopicListView: View {
4957
}
5058

5159
do {
60+
print("load Data...")
5261
var topics: [V2Topic]?
5362

5463
if nodeName == NodeNameAll {

0 commit comments

Comments
 (0)