@@ -76,7 +76,9 @@ class _IssueDetailPageState extends GSYListState<IssueDetailPage> {
7676 new GSYFlexButton (
7777 color: Colors .white,
7878 text: GSYStrings .issue_edit_issue_edit_commit,
79- onPress: () {},
79+ onPress: () {
80+ _editCommit (issueItemViewModel.id, issueItemViewModel.issueComment);
81+ },
8082 ),
8183 new GSYFlexButton (
8284 color: Colors .white,
@@ -111,13 +113,43 @@ class _IssueDetailPageState extends GSYListState<IssueDetailPage> {
111113 }
112114 }
113115
116+ _editCommit (id, content) {
117+ Navigator .pop (context);
118+ String contentData = content;
119+ issueInfoValueControl = new TextEditingController (text: contentData);
120+ //编译Issue Info
121+ CommonUtils .showEditDialog (
122+ context,
123+ GSYStrings .issue_edit_issue,
124+ null ,
125+ (contentValue) {
126+ contentData = contentValue;
127+ },
128+ () {
129+ if (contentData == null || contentData.trim ().length == 0 ) {
130+ Fluttertoast .showToast (msg: GSYStrings .issue_edit_issue_content_not_be_null);
131+ return ;
132+ }
133+ CommonUtils .showLoadingDialog (context);
134+ //提交修改
135+ IssueDao .editCommentDao (userName, reposName, issueNum, id, {"body" : contentData}).then ((result) {
136+ showRefreshLoading ();
137+ Navigator .pop (context);
138+ Navigator .pop (context);
139+ });
140+ },
141+ valueController: issueInfoValueControl,
142+ needTitle: false ,
143+ );
144+ }
145+
114146 _deleteCommit (id) {
115147 Navigator .pop (context);
116148 CommonUtils .showLoadingDialog (context);
117149 //提交修改
118- IssueDao .deleteCommentDao (userName, reposName, issueNum, id).then ()((result) {
119- showRefreshLoading ();
150+ IssueDao .deleteCommentDao (userName, reposName, issueNum, id).then ((result) {
120151 Navigator .pop (context);
152+ showRefreshLoading ();
121153 });
122154 }
123155
0 commit comments