File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import 'dart:async' ;
2-
31import 'package:flutter/material.dart' ;
4- import 'package:gsy_github_app_flutter/common/config/Config.dart' ;
52import 'package:gsy_github_app_flutter/common/dao/IssueDao.dart' ;
63import 'package:gsy_github_app_flutter/common/style/GSYStyle.dart' ;
74import '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,
Original file line number Diff line number Diff line change 1- import 'dart:async' ;
21
32import 'package:flutter/material.dart' ;
4- import 'package:gsy_github_app_flutter/common/config/Config.dart' ;
53import 'package:gsy_github_app_flutter/common/dao/ReposDao.dart' ;
64import 'package:gsy_github_app_flutter/common/utils/EventUtils.dart' ;
75import 'package:gsy_github_app_flutter/widget/EventItem.dart' ;
Original file line number Diff line number Diff 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 {}
You can’t perform that action at this time.
0 commit comments