mirror of
https://github.com/git-touch/git-touch
synced 2025-01-31 16:14:49 +01:00
chore: remove unused news filter
This commit is contained in:
parent
2b6d45c457
commit
f81f65c2e9
@ -8,23 +8,12 @@ import 'package:provider/provider.dart';
|
|||||||
import '../widgets/event_item.dart';
|
import '../widgets/event_item.dart';
|
||||||
import 'package:git_touch/models/auth.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 {
|
class NewsScreen extends StatefulWidget {
|
||||||
@override
|
@override
|
||||||
NewsScreenState createState() => NewsScreenState();
|
NewsScreenState createState() => NewsScreenState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class NewsScreenState extends State<NewsScreen> {
|
class NewsScreenState extends State<NewsScreen> {
|
||||||
String filter = NewsFilter.github;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
initState() {
|
initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
@ -41,13 +30,6 @@ class NewsScreenState extends State<NewsScreen> {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
int get pageSize {
|
|
||||||
if (filter == NewsFilter.all) {
|
|
||||||
return 30;
|
|
||||||
}
|
|
||||||
return 60;
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<ListPayload<EventPayload, int>> fetchEvents([int page = 1]) async {
|
Future<ListPayload<EventPayload, int>> fetchEvents([int page = 1]) async {
|
||||||
final settings = Provider.of<AuthModel>(context);
|
final settings = Provider.of<AuthModel>(context);
|
||||||
final login = settings.activeAccount.login;
|
final login = settings.activeAccount.login;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user