Skip to content

Commit 0471d05

Browse files
committed
issue status changed
1 parent c0df93e commit 0471d05

3 files changed

Lines changed: 26 additions & 6 deletions

File tree

‎lib/page/RepositoryDetailIssueList.dart‎

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
import 'dart:async';
2-
31
import 'package:flutter/material.dart';
4-
import 'package:gsy_github_app_flutter/common/config/Config.dart';
52
import 'package:gsy_github_app_flutter/common/dao/IssueDao.dart';
63
import 'package:gsy_github_app_flutter/common/style/GSYStyle.dart';
74
import 'package:gsy_github_app_flutter/widget/GSYListState.dart';
@@ -43,6 +40,22 @@ class _RepositoryDetailIssuePageState extends GSYListState<RepositoryDetailIssue
4340
);
4441
}
4542

43+
_resolveSelectIndex(selectIndex) {
44+
clearData();
45+
switch (selectIndex) {
46+
case 0:
47+
issueState = null;
48+
break;
49+
case 1:
50+
issueState = 'open';
51+
break;
52+
case 2:
53+
issueState = "closed";
54+
break;
55+
}
56+
showRefreshLoading();
57+
}
58+
4659
@override
4760
bool get wantKeepAlive => true;
4861

@@ -87,7 +100,9 @@ class _RepositoryDetailIssuePageState extends GSYListState<RepositoryDetailIssue
87100
GSYStrings.repos_tab_issue_all,
88101
GSYStrings.repos_tab_issue_open,
89102
GSYStrings.repos_tab_issue_closed,
90-
], (selectIndex) {}),
103+
], (selectIndex) {
104+
_resolveSelectIndex(selectIndex);
105+
}),
91106
),
92107
body: GSYPullLoadWidget(
93108
pullLoadWidgetControl,

‎lib/page/RepostoryDetailInfoPage.dart‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
import 'dart:async';
21

32
import 'package:flutter/material.dart';
4-
import 'package:gsy_github_app_flutter/common/config/Config.dart';
53
import 'package:gsy_github_app_flutter/common/dao/ReposDao.dart';
64
import 'package:gsy_github_app_flutter/common/utils/EventUtils.dart';
75
import 'package:gsy_github_app_flutter/widget/EventItem.dart';

‎lib/widget/GSYListState.dart‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,13 @@ abstract class GSYListState<T extends StatefulWidget> extends State<T> with Auto
7272
});
7373
}
7474

75+
@protected
76+
clearData() {
77+
setState(() {
78+
pullLoadWidgetControl.dataList.clear();
79+
});
80+
}
81+
7582
///下拉刷新数据
7683
@protected
7784
requestRefresh() async {}

0 commit comments

Comments
 (0)