This repository has been archived by the owner on Aug 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Fetch basic user metadata from SQLite if available #925
Merged
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
886449f
Cache our profile data
bfollington fe865fa
Improve time to first render & resilience of profile
bfollington fc541b9
Model loading status explicitly for feed
bfollington d00bfcc
Drop .resolutionStatus from UserProfile
bfollington e419a30
Load profiles from DB
bfollington 2dbe11a
Guarantee we always know the DID of a user
bfollington 36b50f2
Fix navigation
bfollington 6c9b1eb
Fix duplicate follows
bfollington 77a8f01
Remove comments
bfollington 40dee23
Show alias for our profile
bfollington 326f8f8
Add tests for alias calculation
bfollington b3ec16b
Restore dropped comment
bfollington 537f8cd
Drop unused action
bfollington 0806460
Formatting
bfollington 8830916
Avoid hardcoding profile slug
bfollington 22e3cc5
Formatting and cleanup
bfollington 463b805
Drop author from EntryStub
bfollington 2cfea03
Drop in-memory cache
bfollington 5e2d734
Assert DID is correct in listRecent
bfollington 3b7cf40
Add test for readRandomEntryInDateRange
bfollington 9c7491f
Restore .toLink()? calls
bfollington 5c38fc5
Introduce testReadRandomEntryMatching
bfollington 541d13b
Test readUserProfile
bfollington 80cbd87
Test identifyUser (many ways)
bfollington 938703f
Constrain contract on identifyUser to take Petname? instead of Peer?
bfollington 8a4f5fe
Rename tests
bfollington 55bcf5c
Remove `writeTestData`
bfollington 12a68bf
Remove comment
bfollington File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,11 +27,8 @@ struct StoryEntryView: View { | |
|
||
HStack(alignment: .center, spacing: AppTheme.unit) { | ||
BylineSmView( | ||
pfp: story.author.pfp, | ||
slashlink: Slashlink( | ||
peer: story.author.address.peer, | ||
slug: story.entry.address.slug | ||
) | ||
pfp: .generated(story.entry.did), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is all we were using |
||
slashlink: story.entry.address | ||
) | ||
|
||
Spacer() | ||
|
@@ -68,7 +65,6 @@ struct StoryPlainView_Previews: PreviewProvider { | |
static var previews: some View { | ||
StoryEntryView( | ||
story: StoryEntry( | ||
author: UserProfile.dummyData(), | ||
entry: EntryStub( | ||
MemoEntry( | ||
address: Slashlink("@here/meme")!, | ||
|
@@ -84,7 +80,8 @@ struct StoryPlainView_Previews: PreviewProvider { | |
But do we have to go to distant worlds to find other kinds of replicator and other, consequent, kinds of evolution? I think that a new kind of replicator has recently emerged on this very planet. It is staring us in the face. | ||
""" | ||
) | ||
) | ||
), | ||
did: Did.dummyData() | ||
) | ||
), | ||
action: { _, _ in } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Simplified the modelling for name display, we either know a user or we don't.
If we know them, we use our name for them falling back to their nickname for themselves. If we don't know them, we use their nickname (if available) or fall back to the leaf of their current address.
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.
I like the clarity, however, I want to note that this loses us information.
It seems likely at some point we will want to be able to distinguish proposed names from self-proposed names (https://github.com/cwebber/rebooting-the-web-of-trust-spring2018/blob/petnames/draft-documents/petnames.md). For example,
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.
It doesn't actually lose us any information in the model itself, just in the mapping to an (under utilized) view construct. We were rendering
proposedName
andselfNickname
identically before this change so nothing visibly changes as a result of this.If the kind of cases you point out do arise, we can derive all that we need from a
UserProfile
regardless.