mirror of
https://github.com/git-touch/git-touch
synced 2024-12-16 18:28:51 +01:00
fix: hide language bar if no data
This commit is contained in:
parent
cbfa6221e4
commit
7562f391cc
@ -199,25 +199,26 @@ class RepoScreen extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
borderView1,
|
||||
Container(
|
||||
padding: const EdgeInsets.all(_languageBarPadding),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(2),
|
||||
child: SizedBox(
|
||||
height: 10,
|
||||
child: Row(
|
||||
children: join(
|
||||
SizedBox(width: 1),
|
||||
(payload['languages']['edges'] as List)
|
||||
.map((lang) => Container(
|
||||
color: convertColor(lang['node']['color']),
|
||||
width: langWidth *
|
||||
lang['size'] /
|
||||
payload['languages']['totalSize']))
|
||||
.toList())),
|
||||
if ((payload['languages']['edges'] as List).isNotEmpty)
|
||||
Container(
|
||||
padding: const EdgeInsets.all(_languageBarPadding),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(2),
|
||||
child: SizedBox(
|
||||
height: 10,
|
||||
child: Row(
|
||||
children: join(
|
||||
SizedBox(width: 1),
|
||||
(payload['languages']['edges'] as List)
|
||||
.map((lang) => Container(
|
||||
color: convertColor(lang['node']['color']),
|
||||
width: langWidth *
|
||||
lang['size'] /
|
||||
payload['languages']['totalSize']))
|
||||
.toList())),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
TableView(
|
||||
hasIcon: true,
|
||||
items: [
|
||||
|
Loading…
Reference in New Issue
Block a user