Fix compile: scrollPosition needs optional binding; selectedTab is now DetailTab?
Build iOS App / Build .ipa and publish source (push) Successful in 25s
Build iOS App / Build .ipa and publish source (push) Successful in 25s
scrollPosition(id:) requires Binding<some Hashable?>, but selectedTab was a non-optional DetailTab — the build failed with 'generic parameter some Hashable could not be inferred'. Make selectedTab optional (DetailTab? = .overview); bottom-bar == comparisons still work via optional promotion.
This commit is contained in:
1 parent
1817422836
commit
221d23a6a3
1 file changed
+1
-1
@@ -3,7 +3,7 @@ import SwiftUI
|
||||
struct PRDetailView: View {
|
||||
@StateObject private var vm: PRDetailViewModel
|
||||
@Environment(\.dismiss) private var dismiss
|
||||
@State private var selectedTab: DetailTab = .overview
|
||||
@State private var selectedTab: DetailTab? = .overview
|
||||
@State private var showCommentSheet = false
|
||||
@State private var showMergeSheet = false
|
||||
@State private var showCloseConfirm = false
|
||||
|
||||
Reference in new issue
Block a user