Skip to content

Commit

Permalink
Merge pull request #1747 from planetary-social/revert-1744-fix-profil…
Browse files Browse the repository at this point in the history
…e-appear-loop

Revert "Fix performance issue in ProfileView"
  • Loading branch information
mplorentz authored Jan 31, 2025
2 parents 97b557c + 6326e8f commit ba314e9
Show file tree
Hide file tree
Showing 18 changed files with 17 additions and 18 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added ability to delete lists. [#136](https://github.com/verse-pbc/issues/issues/136)
- Added analytics for feed source selection and lists. [#129](https://github.com/verse-pbc/issues/issues/129)
- Fixed: while searching for users to add to a list, NIP-05 searches dismiss the view. [#165](https://github.com/verse-pbc/issues/issues/165)
- Fixed a performance issue that could occur after switching tabs. [#171](https://github.com/verse-pbc/issues/issues/171)
- Fixed a crash when processing a malformed delete (kind 5) event. [#170](https://github.com/verse-pbc/issues/issues/170)

### Internal Changes
Expand Down
2 changes: 1 addition & 1 deletion Nos/Views/Components/Author/AuthorCard.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ enum AvatarOverlayMode {
/// This view displays the information we have for an author suitable for being used in a list.
struct AuthorCard<AvatarOverlay: View>: View {

var author: Author
@ObservedObject var author: Author
@Environment(CurrentUser.self) var currentUser

let avatarOverlayView: () -> AvatarOverlay?
Expand Down
2 changes: 1 addition & 1 deletion Nos/Views/Components/Author/AuthorLabel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import SwiftUI

struct AuthorLabel: View {

var author: Author
@ObservedObject var author: Author
var note: Event?

private var attributedAuthor: AttributedString {
Expand Down
2 changes: 1 addition & 1 deletion Nos/Views/Components/Author/NIP05View.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import SwiftUI

/// Displays a user's NIP-05 in multiple colors and does some verification on it.
struct NIP05View: View {
var author: Author
@ObservedObject var author: Author

@State private var verifiedNip05Identifier: Bool?
@Dependency(\.namesAPI) private var namesAPI
Expand Down
2 changes: 1 addition & 1 deletion Nos/Views/Components/BioView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import SwiftUI

struct BioView: View {

var author: Author
@ObservedObject var author: Author

@Environment(\.managedObjectContext) private var viewContext

Expand Down
2 changes: 1 addition & 1 deletion Nos/Views/Components/Button/CircularButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import SwiftUI
/// Allows the current user to follow or unfollow the author,
/// and updates its own appearance based on follow state.
struct CircularFollowButton: View {
var author: Author
@ObservedObject var author: Author
@Environment(CurrentUser.self) private var currentUser
@Dependency(\.analytics) private var analytics
@Dependency(\.crashReporting) private var crashReporting
Expand Down
2 changes: 1 addition & 1 deletion Nos/Views/Components/Button/FollowButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import CoreData

struct FollowButton: View {
@ObservedObject var currentUserAuthor: Author
var author: Author
@ObservedObject var author: Author
/// A flag used to show a follow or unfollow icon in addition to Follow or
/// Unfollow text.
var shouldDisplayIcon = false
Expand Down
2 changes: 1 addition & 1 deletion Nos/Views/Components/GoldenPostView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ let goldenRatio: CGFloat = 0.618

struct GoldenPostView: View {

var author: Author
@ObservedObject var author: Author
@ObservedObject var note: Event

@EnvironmentObject private var router: Router
Expand Down
2 changes: 1 addition & 1 deletion Nos/Views/Components/KnownFollowersView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import SwiftUI
/// impersonation attacks by making sure they choose the right person to follow, mention, message, etc.
struct KnownFollowersView: View {

var author: Author
@ObservedObject var author: Author

/// The authors that the `source` author follows who also follow the `author`
@FetchRequest private var knownFollowers: FetchedResults<Author>
Expand Down
2 changes: 1 addition & 1 deletion Nos/Views/Home/HomeTab.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ fileprivate struct PopoverTipView: View {
}

struct HomeTab: View {
var user: Author
@ObservedObject var user: Author

@EnvironmentObject private var router: Router
@ObserveInjection var inject
Expand Down
2 changes: 1 addition & 1 deletion Nos/Views/Note/NoteCardHeader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import SwiftUI
struct NoteCardHeader: View {

@ObservedObject var note: Event
var author: Author
@ObservedObject var author: Author

var body: some View {
HStack(alignment: .center, spacing: 8) {
Expand Down
2 changes: 1 addition & 1 deletion Nos/Views/Profile/ActivityPubBadgeView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import SwiftUI
/// A view that displays a badge with an ActivityPub icon.
struct ActivityPubBadgeView: View {

var author: Author
@ObservedObject var author: Author

var fediverseServer: String {
let regex = /[0-9A-Za-z._-]+@(?<fediverse>[0-9A-Za-z._-]+)\.mostr\.pub/
Expand Down
2 changes: 1 addition & 1 deletion Nos/Views/Profile/BioSheet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import SwiftUI

/// Shows the name, nip-05 and bio of a given user in a vertical stack.
struct BioSheet: View {
var author: Author
@ObservedObject var author: Author

@Environment(\.managedObjectContext) private var viewContext
@Dependency(\.noteParser) private var noteParser
Expand Down
2 changes: 1 addition & 1 deletion Nos/Views/Profile/Edit/ProfileEditView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ struct ProfileEditView: View {

@Dependency(\.crashReporting) private var crashReporting

var author: Author
@ObservedObject var author: Author

@State private var displayNameText: String = ""
@State private var bioText: String = ""
Expand Down
2 changes: 1 addition & 1 deletion Nos/Views/Profile/ProfileHeader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import CoreData
import Logger

struct ProfileHeader: View {
var author: Author
@ObservedObject var author: Author
@Environment(CurrentUser.self) private var currentUser

@Binding private var selectedTab: ProfileFeedType
Expand Down
2 changes: 1 addition & 1 deletion Nos/Views/Profile/ProfileTab.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import SwiftUI
struct ProfileTab: View {

@Environment(CurrentUser.self) var currentUser
var author: Author
@ObservedObject var author: Author

@Binding var path: NavigationPath

Expand Down
2 changes: 1 addition & 1 deletion Nos/Views/Profile/ProfileView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Logger

struct ProfileView: View {

var author: Author
@ObservedObject var author: Author
var addDoubleTapToPop = false

@Environment(\.managedObjectContext) private var viewContext
Expand Down
2 changes: 1 addition & 1 deletion Nos/Views/Relay/RelayView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ struct RelayView: View {
@Environment(\.managedObjectContext) private var viewContext
@Environment(RelayService.self) private var relayService
@Environment(CurrentUser.self) private var currentUser
var author: Author
@ObservedObject var author: Author

@State var newRelayAddress: String = ""

Expand Down

0 comments on commit ba314e9

Please sign in to comment.