@@ -126,6 +126,7 @@ class ReposHeaderItem extends StatelessWidget {
126126 crossAxisAlignment: CrossAxisAlignment .center,
127127 mainAxisAlignment: MainAxisAlignment .center,
128128 children: < Widget > [
129+ ///star状态
129130 _getBottomItem (
130131 GSYICons .REPOS_ITEM_STAR ,
131132 reposHeaderViewModel.repositoryStar,
@@ -134,6 +135,7 @@ class ReposHeaderItem extends StatelessWidget {
134135 userName: reposHeaderViewModel.ownerName, reposName: reposHeaderViewModel.repositoryName);
135136 },
136137 ),
138+ ///fork状态
137139 new Container (width: 0.3 , height: 25.0 , color: Color (GSYColors .subLightTextColor)),
138140 _getBottomItem (
139141 GSYICons .REPOS_ITEM_FORK ,
@@ -143,6 +145,7 @@ class ReposHeaderItem extends StatelessWidget {
143145 userName: reposHeaderViewModel.ownerName, reposName: reposHeaderViewModel.repositoryName);
144146 },
145147 ),
148+ ///订阅状态
146149 new Container (width: 0.3 , height: 25.0 , color: Color (GSYColors .subLightTextColor)),
147150 _getBottomItem (
148151 GSYICons .REPOS_ITEM_WATCH ,
@@ -152,11 +155,23 @@ class ReposHeaderItem extends StatelessWidget {
152155 userName: reposHeaderViewModel.ownerName, reposName: reposHeaderViewModel.repositoryName);
153156 },
154157 ),
158+ ///issue状态
155159 new Container (width: 0.3 , height: 25.0 , color: Color (GSYColors .subLightTextColor)),
156160 _getBottomItem (
157161 GSYICons .REPOS_ITEM_ISSUE ,
158162 reposHeaderViewModel.repositoryIssue,
159- () {},
163+ () {
164+ if (reposHeaderViewModel.allIssueCount == null || reposHeaderViewModel.allIssueCount <= 0 ) {
165+ return ;
166+ }
167+ List <String > list = [
168+ GSYStrings .repos_all_issue_count + reposHeaderViewModel.allIssueCount.toString (),
169+ GSYStrings .repos_open_issue_count + reposHeaderViewModel.openIssuesCount.toString (),
170+ GSYStrings .repos_close_issue_count +
171+ (reposHeaderViewModel.allIssueCount - reposHeaderViewModel.openIssuesCount).toString (),
172+ ];
173+ CommonUtils .showCommitOptionDialog (context, list, (index) {}, height: 150.0 );
174+ },
160175 ),
161176 ],
162177 )),
@@ -195,6 +210,8 @@ class ReposHeaderViewModel {
195210 String created_at = "" ;
196211 String push_at = "" ;
197212 String license = "" ;
213+ int allIssueCount = 0 ;
214+ int openIssuesCount = 0 ;
198215 bool repositoryStared = false ;
199216 bool repositoryForked = false ;
200217 bool repositoryWatched = false ;
@@ -209,6 +226,8 @@ class ReposHeaderViewModel {
209226 }
210227 this .ownerPic = map.owner.avatar_url;
211228 this .repositoryName = reposName;
229+ this .allIssueCount = map.allIssueCount;
230+ this .openIssuesCount = map.openIssuesCount;
212231 this .repositoryStar = map.watchersCount != null ? map.watchersCount.toString () : "" ;
213232 this .repositoryFork = map.forksCount != null ? map.forksCount.toString () : "" ;
214233 this .repositoryWatch = map.subscribersCount != null ? map.subscribersCount.toString () : "" ;
0 commit comments