From 02e8d66ae2d9271b50ad54f682703f56bb582c26 Mon Sep 17 00:00:00 2001 From: Rongjian Zhang Date: Sun, 11 Oct 2020 22:18:22 +0800 Subject: [PATCH] fix(gitlab): user and group link closes #115 --- lib/screens/gl_groups.dart | 2 +- lib/widgets/user_item.dart | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/screens/gl_groups.dart b/lib/screens/gl_groups.dart index cb2342a..91ddc2f 100644 --- a/lib/screens/gl_groups.dart +++ b/lib/screens/gl_groups.dart @@ -24,7 +24,7 @@ class GlGroupsScreenn extends StatelessWidget { ); }, itemBuilder: (v) { - return UserItem.gitlab( + return UserItem.gitlabGroup( avatarUrl: v.avatarUrl, login: v.path, name: v.name, diff --git a/lib/widgets/user_item.dart b/lib/widgets/user_item.dart index b8e00b4..dd43487 100644 --- a/lib/widgets/user_item.dart +++ b/lib/widgets/user_item.dart @@ -32,6 +32,14 @@ class UserItem extends StatelessWidget { @required this.avatarUrl, @required this.bio, @required int id, + }) : url = '/gitlab/user/$id'; + + UserItem.gitlabGroup({ + @required this.login, + @required this.name, + @required this.avatarUrl, + @required this.bio, + @required int id, }) : url = '/gitlab/group/$id'; UserItem.gitea({