From f81f65c2e9abf1c01270b84487fa9d08251c5bbf Mon Sep 17 00:00:00 2001 From: Rongjian Zhang Date: Sun, 6 Oct 2019 16:17:31 +0800 Subject: [PATCH] chore: remove unused news filter --- lib/screens/news.dart | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/lib/screens/news.dart b/lib/screens/news.dart index cb1f005..3b243b1 100644 --- a/lib/screens/news.dart +++ b/lib/screens/news.dart @@ -8,23 +8,12 @@ import 'package:provider/provider.dart'; import '../widgets/event_item.dart'; import 'package:git_touch/models/auth.dart'; -class NewsFilter { - static const all = 'all'; - - /// The same as GitHub dashboard - /// - /// Exclude issue and pull request events - static const github = 'github'; -} - class NewsScreen extends StatefulWidget { @override NewsScreenState createState() => NewsScreenState(); } class NewsScreenState extends State { - String filter = NewsFilter.github; - @override initState() { super.initState(); @@ -41,13 +30,6 @@ class NewsScreenState extends State { }); } - int get pageSize { - if (filter == NewsFilter.all) { - return 30; - } - return 60; - } - Future> fetchEvents([int page = 1]) async { final settings = Provider.of(context); final login = settings.activeAccount.login;