mirror of
https://github.com/git-touch/git-touch
synced 2025-02-20 21:40:44 +01:00
feat: hide owner of user page repos if same
This commit is contained in:
parent
c300113b8a
commit
9bdb01e04c
@ -79,13 +79,17 @@ class _UserScreenState extends State<UserScreen> {
|
||||
}
|
||||
|
||||
return ListGroup(
|
||||
title: Text(
|
||||
title,
|
||||
style: TextStyle(fontSize: 16),
|
||||
),
|
||||
items: items,
|
||||
itemBuilder: (item, _) => RepoItem(item),
|
||||
);
|
||||
title: Text(
|
||||
title,
|
||||
style: TextStyle(fontSize: 16),
|
||||
),
|
||||
items: items,
|
||||
itemBuilder: (item, _) {
|
||||
return RepoItem(
|
||||
item,
|
||||
showOwner: item['owner']['login'] != widget.login,
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
Widget _buildEmail(payload) {
|
||||
|
@ -6,8 +6,9 @@ import 'link.dart';
|
||||
|
||||
class RepoItem extends StatelessWidget {
|
||||
final Map<String, dynamic> payload;
|
||||
final bool showOwner;
|
||||
|
||||
RepoItem(this.payload);
|
||||
RepoItem(this.payload, {this.showOwner = true});
|
||||
|
||||
IconData _buildIconData() {
|
||||
if (payload['isPrivate']) {
|
||||
@ -34,7 +35,8 @@ class RepoItem extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Text(
|
||||
payload['owner']['login'] + '/' + payload['name'],
|
||||
(showOwner ? (payload['owner']['login'] + '/') : '') +
|
||||
payload['name'],
|
||||
style: TextStyle(fontWeight: FontWeight.w600, fontSize: 15),
|
||||
),
|
||||
Padding(padding: EdgeInsets.only(top: 6)),
|
||||
|
Loading…
x
Reference in New Issue
Block a user