Skip to content

Commit 1a74748

Browse files
committed
close by
1 parent 20c925c commit 1a74748

5 files changed

Lines changed: 31 additions & 7 deletions

File tree

‎VERSION.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
* markdown点击跳转。
1717
* webview点击跳转。
1818
* markdown htmlview 表格。
19-
* issue输入框的快速按键。
2019

2120
### 1.0.2 (更新中)
2221

@@ -27,6 +26,7 @@
2726
* 趋势语言,搜索语言加dart。
2827
* 前后台切换刷新动态。
2928
* issue使用markdown解析
29+
* issue输入框的快速输入按键。
3030

3131

3232
### 1.0.1 (已发布)

‎lib/common/model/Issue.dart‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ class Issue extends Object with _$IssueSerializerMixin {
3333
String repoUrl;
3434
@JsonKey(name: "html_url")
3535
String htmlUrl;
36+
@JsonKey(name: "closed_by")
37+
User closeBy;
38+
39+
3640

3741
Issue(
3842
this.id,
@@ -49,6 +53,7 @@ class Issue extends Object with _$IssueSerializerMixin {
4953
this.user,
5054
this.repoUrl,
5155
this.htmlUrl,
56+
this.closeBy,
5257
);
5358

5459
factory Issue.fromJson(Map<String, dynamic> json) => _$IssueFromJson(json);

‎lib/common/model/Issue.g.dart‎

Lines changed: 7 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎lib/widget/IssueEditDIalog.dart‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,6 @@ class _IssueEditDialogState extends State<IssueEditDialog> {
8383
newText = valueController.value.text;
8484
}
8585
newText = newText + text;
86-
print("fffff");
87-
print(newText);
8886
setState(() {
8987
valueController.value = new TextEditingValue(text: newText);
9088
});

‎lib/widget/IssueHeaderItem.dart‎

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,19 @@ class IssueHeaderItem extends StatelessWidget {
5959
return bottomContainer;
6060
}
6161

62+
///关闭操作人
63+
_renderCloseByText() {
64+
return (issueHeaderViewModel.closed_by == null)
65+
? new Container()
66+
: new Container(
67+
child: new Text(
68+
"Close By " + issueHeaderViewModel.closed_by,
69+
style: GSYConstant.subSmallText,
70+
),
71+
margin: new EdgeInsets.only(right: 5.0, top: 10.0, bottom: 10.0),
72+
alignment: Alignment.topRight);
73+
}
74+
6275
@override
6376
Widget build(BuildContext context) {
6477
return new GSYCardItem(
@@ -123,6 +136,9 @@ class IssueHeaderItem extends StatelessWidget {
123136

124137
///评论内容
125138
GSYMarkdownWidget(markdownData: issueHeaderViewModel.issueDesHtml, style: GSYMarkdownWidget.DARK_THEME),
139+
140+
///close 用户
141+
_renderCloseByText()
126142
],
127143
),
128144
),
@@ -136,7 +152,7 @@ class IssueHeaderViewModel {
136152
String actionUser = "---";
137153
String actionUserPic = "---";
138154

139-
//String closed_by = "---";
155+
String closed_by = "---";
140156
bool locked = false;
141157
String issueComment = "---";
142158
String issueDesHtml = "---";
@@ -151,7 +167,7 @@ class IssueHeaderViewModel {
151167
actionTime = CommonUtils.getNewsTimeStr(issueMap.createdAt);
152168
actionUser = issueMap.user.login;
153169
actionUserPic = issueMap.user.avatar_url;
154-
//closed_by = issueMap.closed_by != null ? issueMap["closed_by"]["login"] : "";
170+
closed_by = issueMap.closeBy != null ? issueMap.closeBy.login : "";
155171
locked = issueMap.locked;
156172
issueComment = issueMap.title;
157173
issueDesHtml = issueMap.bodyHtml != null ? issueMap.bodyHtml : (issueMap.body != null) ? issueMap.body : "";

0 commit comments

Comments
 (0)