Mirror of @tangled.org/core. Running on a Raspberry Pi Zero 2 (Please be gentle).
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

appview: remove unused fields on `RepoInfo`

Signed-off-by: Seongmin Lee <git@boltless.me>

authored by

Seongmin Lee and committed by
Tangled
a6290643 7b60cbfc

+21 -28
+21 -18
appview/pages/repoinfo/repoinfo.go
··· 1 1 package repoinfo 2 2 3 3 import ( 4 + "fmt" 4 5 "path" 5 6 "slices" 6 7 7 8 "github.com/bluesky-social/indigo/atproto/syntax" 9 + "tangled.org/core/api/tangled" 8 10 "tangled.org/core/appview/models" 9 11 "tangled.org/core/appview/state/userutil" 10 12 ) ··· 50 48 return tabs 51 49 } 52 50 51 + func (r RepoInfo) RepoAt() syntax.ATURI { 52 + return syntax.ATURI(fmt.Sprintf("at://%s/%s/%s", r.OwnerDid, tangled.RepoNSID, r.Rkey)) 53 + } 54 + 53 55 type RepoInfo struct { 54 - Name string 55 - Rkey string 56 - OwnerDid string 57 - OwnerHandle string 58 - Description string 59 - Website string 60 - Topics []string 61 - Knot string 62 - Spindle string 63 - RepoAt syntax.ATURI 64 - IsStarred bool 65 - Stats models.RepoStats 66 - Roles RolesInRepo 67 - Source *models.Repo 68 - SourceHandle string 69 - Ref string 70 - DisableFork bool 71 - CurrentDir string 56 + Name string 57 + Rkey string 58 + OwnerDid string 59 + OwnerHandle string 60 + Description string 61 + Website string 62 + Topics []string 63 + Knot string 64 + Spindle string 65 + IsStarred bool 66 + Stats models.RepoStats 67 + Roles RolesInRepo 68 + Source *models.Repo 69 + Ref string 70 + CurrentDir string 72 71 } 73 72 74 73 // each tab on a repo could have some metadata:
-10
appview/reporesolver/resolver.go
··· 147 147 } 148 148 } 149 149 150 - var sourceHandle *identity.Identity 151 - if sourceRepo != nil { 152 - sourceHandle, err = f.rr.idResolver.ResolveIdent(context.Background(), sourceRepo.Did) 153 - if err != nil { 154 - log.Println("failed to resolve source repo", err) 155 - } 156 - } 157 - 158 150 knot := f.Knot 159 151 160 152 repoInfo := repoinfo.RepoInfo{ ··· 154 162 OwnerHandle: f.OwnerId.Handle.String(), 155 163 Name: f.Name, 156 164 Rkey: f.Rkey, 157 - RepoAt: repoAt, 158 165 Description: f.Description, 159 166 Website: f.Website, 160 167 Topics: f.Topics, ··· 172 181 173 182 if sourceRepo != nil { 174 183 repoInfo.Source = sourceRepo 175 - repoInfo.SourceHandle = sourceHandle.Handle.String() 176 184 } 177 185 178 186 return repoInfo