fix: star and fork count 0 case
This commit is contained in:
parent
c06179e109
commit
ec1d995660
|
@ -60,17 +60,20 @@ class _TrendingScreenState extends State<TrendingScreen> {
|
||||||
?.replaceAll(RegExp(r'</g-emoji>'), ''),
|
?.replaceAll(RegExp(r'</g-emoji>'), ''),
|
||||||
'stargazers': {
|
'stargazers': {
|
||||||
'totalCount': item.children[3]
|
'totalCount': item.children[3]
|
||||||
.querySelectorAll('a')[0]
|
.querySelector('.octicon-star')
|
||||||
|
?.parent
|
||||||
?.innerHtml
|
?.innerHtml
|
||||||
?.replaceFirst(RegExp(r'^[\s\S]*svg>'), '')
|
?.replaceFirst(RegExp(r'^[\s\S]*svg>'), '')
|
||||||
?.trim()
|
?.trim()
|
||||||
},
|
},
|
||||||
'forks': {
|
'forks': {
|
||||||
'totalCount': item.children[3]
|
'totalCount': item
|
||||||
.querySelectorAll('a')[1]
|
.querySelector('.octicon-repo-forked')
|
||||||
?.innerHtml
|
?.parent
|
||||||
?.replaceFirst(RegExp(r'^[\s\S]*svg>'), '')
|
?.innerHtml
|
||||||
?.trim(),
|
?.replaceFirst(RegExp(r'^[\s\S]*svg>'), '')
|
||||||
|
?.trim() ??
|
||||||
|
0,
|
||||||
},
|
},
|
||||||
'primaryLanguage': lang,
|
'primaryLanguage': lang,
|
||||||
'isPrivate': false,
|
'isPrivate': false,
|
||||||
|
|
Loading…
Reference in New Issue