committed by
William Casarin
parent
0da10eb716
commit
9847f12c95
@@ -7,11 +7,6 @@
|
||||
|
||||
import SwiftUI
|
||||
|
||||
enum ProfileTab: Hashable {
|
||||
case posts
|
||||
case following
|
||||
}
|
||||
|
||||
enum FollowState {
|
||||
case follows
|
||||
case following
|
||||
@@ -36,19 +31,6 @@ func follow_btn_txt(_ fs: FollowState, follows_you: Bool) -> String {
|
||||
}
|
||||
}
|
||||
|
||||
func follow_btn_enabled_state(_ fs: FollowState) -> Bool {
|
||||
switch fs {
|
||||
case .follows:
|
||||
return true
|
||||
case .following:
|
||||
return false
|
||||
case .unfollowing:
|
||||
return false
|
||||
case .unfollows:
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
func followersCountString(_ count: Int, locale: Locale = Locale.current) -> String {
|
||||
let format = localizedStringFormat(key: "followers_count", locale: locale)
|
||||
return String(format: format, locale: locale, count)
|
||||
@@ -114,8 +96,6 @@ struct ProfileView: View {
|
||||
|
||||
static let markdown = Markdown()
|
||||
|
||||
@State private var selected_tab: ProfileTab = .posts
|
||||
@State private var showingEditProfile = false
|
||||
@State var showing_select_wallet: Bool = false
|
||||
@State var is_zoomed: Bool = false
|
||||
@State var show_share_sheet: Bool = false
|
||||
@@ -141,7 +121,6 @@ struct ProfileView: View {
|
||||
|
||||
@Environment(\.dismiss) var dismiss
|
||||
@Environment(\.colorScheme) var colorScheme
|
||||
@Environment(\.openURL) var openURL
|
||||
@Environment(\.presentationMode) var presentationMode
|
||||
|
||||
func imageBorderColor() -> Color {
|
||||
@@ -419,7 +398,7 @@ struct ProfileView: View {
|
||||
}
|
||||
.buttonStyle(PlainButtonStyle())
|
||||
} else {
|
||||
NavigationLink(destination: UserRelaysView(state: damus_state, pubkey: profile.pubkey, relays: Array(relays.keys).sorted())) {
|
||||
NavigationLink(destination: UserRelaysView(state: damus_state, relays: Array(relays.keys).sorted())) {
|
||||
relay_text
|
||||
}
|
||||
.buttonStyle(PlainButtonStyle())
|
||||
@@ -450,10 +429,10 @@ struct ProfileView: View {
|
||||
.background(colorScheme == .dark ? Color.black : Color.white)
|
||||
|
||||
if filter_state == FilterState.posts {
|
||||
InnerTimelineView(events: profile.events, damus: damus_state, show_friend_icon: false, filter: FilterState.posts.filter)
|
||||
InnerTimelineView(events: profile.events, damus: damus_state, filter: FilterState.posts.filter)
|
||||
}
|
||||
if filter_state == FilterState.posts_and_replies {
|
||||
InnerTimelineView(events: profile.events, damus: damus_state, show_friend_icon: false, filter: FilterState.posts_and_replies.filter)
|
||||
InnerTimelineView(events: profile.events, damus: damus_state, filter: FilterState.posts_and_replies.filter)
|
||||
}
|
||||
}
|
||||
.padding(.horizontal, Theme.safeAreaInsets?.left)
|
||||
|
||||
Reference in New Issue
Block a user