A few more navigation links from rebase
This commit is contained in:
committed by
William Casarin
parent
58a707685c
commit
69663b8207
@@ -451,7 +451,7 @@ struct ProfileView: View {
|
||||
if !friended_followers.isEmpty {
|
||||
Spacer()
|
||||
|
||||
NavigationLink(destination: FollowersYouKnowView(damus_state: damus_state, friended_followers: friended_followers)) {
|
||||
NavigationLink(value: Route.FollowersYouKnow(friendedFollowers: friended_followers)) {
|
||||
HStack {
|
||||
CondensedProfilePicturesView(state: damus_state, pubkeys: friended_followers, maxPictures: 3)
|
||||
Text(followedByString(friended_followers, profiles: damus_state.profiles))
|
||||
@@ -521,6 +521,7 @@ struct ProfileView: View {
|
||||
}
|
||||
.fullScreenCover(isPresented: $show_qr_code) {
|
||||
QRCodeView(damus_state: damus_state, pubkey: profile.pubkey)
|
||||
.environmentObject(navigationCoordinator)
|
||||
}
|
||||
|
||||
if damus_state.is_privkey_user {
|
||||
|
||||
@@ -45,12 +45,12 @@ struct QRCodeView: View {
|
||||
@State var pubkey: String
|
||||
|
||||
@Environment(\.presentationMode) var presentationMode
|
||||
@EnvironmentObject var navigationCoordinator: NavigationCoordinator
|
||||
|
||||
@State private var selectedTab = 0
|
||||
|
||||
@State var scanResult: ProfileScanResult? = nil
|
||||
|
||||
@State var showProfileView: Bool = false
|
||||
|
||||
@State var profile: Profile? = nil
|
||||
@State var error: String? = nil
|
||||
|
||||
@@ -209,13 +209,6 @@ struct QRCodeView: View {
|
||||
|
||||
Spacer()
|
||||
|
||||
if let scanResult {
|
||||
let dst = ProfileView(damus_state: damus_state, pubkey: scanResult.pubkey)
|
||||
NavigationLink(destination: dst, isActive: $showProfileView) {
|
||||
EmptyView()
|
||||
}
|
||||
}
|
||||
|
||||
Spacer()
|
||||
|
||||
Button(action: {
|
||||
@@ -271,9 +264,10 @@ struct QRCodeView: View {
|
||||
|
||||
func show_profile_after_delay() {
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + animationDuration) {
|
||||
showProfileView = true
|
||||
if let scanResult {
|
||||
navigationCoordinator.push(route: Route.ProfileByKey(pubkey: scanResult.pubkey))
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func cameraAnimate(completion: @escaping () -> Void) {
|
||||
|
||||
@@ -42,9 +42,7 @@ struct RecommendedRelayView: View {
|
||||
Text(relay).layoutPriority(1)
|
||||
|
||||
if let meta = damus.relay_metadata.lookup(relay_id: relay) {
|
||||
NavigationLink ( destination:
|
||||
RelayDetailView(state: damus, relay: relay, nip11: meta)
|
||||
){
|
||||
NavigationLink(value: Route.RelayDetail(relay: relay, metadata: meta)){
|
||||
EmptyView()
|
||||
}
|
||||
.opacity(0.0)
|
||||
|
||||
@@ -15,6 +15,7 @@ struct SideMenuView: View {
|
||||
@State private var showQRCode = false
|
||||
|
||||
@Environment(\.colorScheme) var colorScheme
|
||||
@EnvironmentObject var navigationCoordinator: NavigationCoordinator
|
||||
|
||||
var sideBarWidth = min(UIScreen.main.bounds.size.width * 0.65, 400.0)
|
||||
let verticalSpacing: CGFloat = 20
|
||||
@@ -161,6 +162,7 @@ struct SideMenuView: View {
|
||||
.dynamicTypeSize(.xSmall)
|
||||
}).fullScreenCover(isPresented: $showQRCode) {
|
||||
QRCodeView(damus_state: damus_state, pubkey: damus_state.pubkey)
|
||||
.environmentObject(navigationCoordinator)
|
||||
}
|
||||
}
|
||||
.padding(.top, verticalSpacing)
|
||||
|
||||
Reference in New Issue
Block a user