sidemenu: split out profile section
We will be adding to this and it is getting messy
This commit is contained in:
@@ -81,14 +81,9 @@ struct SideMenuView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var MainSidemenu: some View {
|
var TopProfile: some View {
|
||||||
VStack(alignment: .leading, spacing: 0) {
|
|
||||||
let profile = damus_state.profiles.lookup(id: damus_state.pubkey)
|
let profile = damus_state.profiles.lookup(id: damus_state.pubkey)
|
||||||
let followers = FollowersModel(damus_state: damus_state, target: damus_state.pubkey)
|
return HStack {
|
||||||
let profile_model = ProfileModel(pubkey: damus_state.pubkey, damus: damus_state)
|
|
||||||
|
|
||||||
NavigationLink(value: Route.Profile(profile: profile_model, followers: followers), label: {
|
|
||||||
HStack {
|
|
||||||
ProfilePicView(pubkey: damus_state.pubkey, size: 60, highlight: .none, profiles: damus_state.profiles, disable_animation: damus_state.settings.disable_animation)
|
ProfilePicView(pubkey: damus_state.pubkey, size: 60, highlight: .none, profiles: damus_state.profiles, disable_animation: damus_state.settings.disable_animation)
|
||||||
|
|
||||||
VStack(alignment: .leading) {
|
VStack(alignment: .leading) {
|
||||||
@@ -106,6 +101,16 @@ struct SideMenuView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var MainSidemenu: some View {
|
||||||
|
VStack(alignment: .leading, spacing: 0) {
|
||||||
|
let followers = FollowersModel(damus_state: damus_state, target: damus_state.pubkey)
|
||||||
|
let profile_model = ProfileModel(pubkey: damus_state.pubkey, damus: damus_state)
|
||||||
|
|
||||||
|
NavigationLink(value: Route.Profile(profile: profile_model, followers: followers), label: {
|
||||||
|
|
||||||
|
TopProfile
|
||||||
.padding(.bottom, verticalSpacing)
|
.padding(.bottom, verticalSpacing)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user