-
Notifications
You must be signed in to change notification settings - Fork 0
Index and purge peers by petname + rework follow / unfollow lifecycle #990
Conversation
d37f015
to
bc771d6
Compare
xcode/Subconscious/Shared/Components/Common/Byline/PetnameView.swift
Outdated
Show resolved
Hide resolved
xcode/Subconscious/Shared/Components/Common/Profile/UserProfileView.swift
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, with a few nits and questions.
Also, given this is a pretty big change, and touches the data layer, are there any additional unit tests we should write for this?
xcode/Subconscious/Shared/Components/Common/Byline/PetnameView.swift
Outdated
Show resolved
Hide resolved
guard self.state == .ready else { | ||
throw DatabaseServiceError.notReady | ||
} | ||
let savepoint = "purge" | ||
|
||
guard let peer = try readPeer(petname: petname) else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this guard clause necessary? If we delete a peer, but there are no peers with that name, the end result should be the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to know the DID of a peer to delete from the memos
table, which we can only get by reading the peer.
@bfollington one more note: the animations for refreshing profile seem wonky, especially around the feed (seems to animate from the bottom?) |
Improves #989
Fixes #946
Fixes #977
This PR remodels the follow/unfollow/rename operations and refresh lifecycle. It also introduces support for indexing multiple peers that point to the same DID.
Screen.Recording.2023-11-13.at.1.04.23.pm.mov
I intend to refactor the "wait for petname resolution" logic and background jobs in general as a follow up in #996
Tasks