diff --git a/lib/screens/gitea_user.dart b/lib/screens/gitea_user.dart index 54eac33..4fe12bf 100644 --- a/lib/screens/gitea_user.dart +++ b/lib/screens/gitea_user.dart @@ -71,7 +71,8 @@ class GiteaUserScreen extends StatelessWidget { starCount: v.starsCount, forkCount: v.forksCount, note: 'Updated ${timeago.format(v.updatedAt)}', - url: '/gitea/${v.owner.login}/${v.name}', // TODO: + url: '/gitea/${v.owner.login}/${v.name}', + avatarLink: '/gitea/${v.owner.login}', ) ], ) diff --git a/lib/widgets/repository_item.dart b/lib/widgets/repository_item.dart index abdb5b9..dc4f1e6 100644 --- a/lib/widgets/repository_item.dart +++ b/lib/widgets/repository_item.dart @@ -18,6 +18,7 @@ class RepositoryItem extends StatelessWidget { final String primaryLanguageColor; final String note; final String url; + final String avatarLink; RepositoryItem({ @required this.owner, @@ -31,6 +32,7 @@ class RepositoryItem extends StatelessWidget { this.note, this.iconData, @required this.url, + @required this.avatarLink, }); RepositoryItem.gl({ @@ -46,6 +48,7 @@ class RepositoryItem extends StatelessWidget { this.primaryLanguageColor, this.note, }) : url = '/gitlab/projects/$id', + avatarLink = '/gitlab/user/$id', iconData = _buildGlIconData(visibility); RepositoryItem.gh({ @@ -61,6 +64,7 @@ class RepositoryItem extends StatelessWidget { @required bool isPrivate, @required bool isFork, }) : iconData = _buildIconData(isPrivate, isFork), + avatarLink = '/$owner', url = '/$owner/$name'; static IconData _buildIconData(bool isPrivate, bool isFork) { @@ -101,7 +105,7 @@ class RepositoryItem extends StatelessWidget { Avatar( url: avatarUrl, size: AvatarSize.small, - linkUrl: '/$owner', + linkUrl: avatarLink, ), SizedBox(width: 8), Expanded(