Commit 2f09376 1 parent 3fcc20b commit 2f09376 Copy full SHA for 2f09376
File tree 4 files changed +15
-9
lines changed
SwiftPamphletApp/GitHubAPI
4 files changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ struct IssueView: View {
12
12
case normal, hiddenUserInfo
13
13
}
14
14
15
- @StateObject var vm : IssueVM
15
+ @State var vm : IssueVM
16
16
@State var type : EnterType = . normal
17
17
18
18
var body : some View {
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import SwiftUI
9
9
10
10
struct ActiveDeveloperListView : View {
11
11
@EnvironmentObject var appVM : AppVM
12
- @StateObject var vm : IssueVM
12
+ @State var vm : IssueVM
13
13
var body : some View {
14
14
List {
15
15
Section {
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import SwiftUI
9
9
10
10
struct IssuesListFromCustomView : View {
11
11
@EnvironmentObject var appVM : AppVM
12
- @StateObject var vm : IssueVM
12
+ @State var vm : IssueVM
13
13
var body : some View {
14
14
List {
15
15
ForEach ( vm. customIssues) { ci in
Original file line number Diff line number Diff line change 8
8
import Foundation
9
9
import Combine
10
10
11
+ @Observable
11
12
final class IssueVM : APIVMable {
12
13
private var cancellables : [ AnyCancellable ] = [ ]
14
+
15
+ @ObservationIgnored
13
16
public let repoName : String
17
+ @ObservationIgnored
14
18
public let issueNumber : Int
19
+ @ObservationIgnored
15
20
public let guideName : String
16
- @Published private( set) var issue : IssueModel
17
- @Published private( set) var comments : [ IssueComment ]
18
- @Published private( set) var customIssues : [ CustomIssuesModel ]
19
- @Published private( set) var cIADs : [ SPActiveDevelopersModel ] // 开发者动态
20
- @Published var errHint = false
21
- @Published var errMsg = " "
21
+
22
+ var issue : IssueModel
23
+ var comments : [ IssueComment ]
24
+ var customIssues : [ CustomIssuesModel ]
25
+ var cIADs : [ SPActiveDevelopersModel ] // 开发者动态
26
+ var errHint = false
27
+ var errMsg = " "
22
28
23
29
// MARK: - APISev
24
30
private let apiSev : APISev
You can’t perform that action at this time.
0 commit comments