mirror of
https://github.com/git-touch/git-touch
synced 2024-12-16 18:28:51 +01:00
fix: users screen title
This commit is contained in:
parent
c6acbf9d8c
commit
bd4ed6382c
@ -10,27 +10,33 @@ class UsersScreen extends StatelessWidget {
|
|||||||
final String scope;
|
final String scope;
|
||||||
final String params;
|
final String params;
|
||||||
final String resource;
|
final String resource;
|
||||||
|
final String title;
|
||||||
|
|
||||||
UsersScreen.followers(String login)
|
UsersScreen.followers(String login)
|
||||||
: scope = 'user',
|
: scope = 'user',
|
||||||
params = 'login: "$login"',
|
params = 'login: "$login"',
|
||||||
resource = 'followers';
|
resource = 'followers',
|
||||||
|
title = 'Followers';
|
||||||
UsersScreen.following(String login)
|
UsersScreen.following(String login)
|
||||||
: scope = 'user',
|
: scope = 'user',
|
||||||
params = 'login: "$login"',
|
params = 'login: "$login"',
|
||||||
resource = 'following';
|
resource = 'following',
|
||||||
|
title = 'Following';
|
||||||
UsersScreen.stars(String owner, String name)
|
UsersScreen.stars(String owner, String name)
|
||||||
: scope = 'repository',
|
: scope = 'repository',
|
||||||
params = 'owner: "$owner", name: "$name"',
|
params = 'owner: "$owner", name: "$name"',
|
||||||
resource = 'stargazers';
|
resource = 'stargazers',
|
||||||
|
title = 'Stargazers';
|
||||||
UsersScreen.watchers(String owner, String name)
|
UsersScreen.watchers(String owner, String name)
|
||||||
: scope = 'repository',
|
: scope = 'repository',
|
||||||
params = 'owner: "$owner", name: "$name"',
|
params = 'owner: "$owner", name: "$name"',
|
||||||
resource = 'watchers';
|
resource = 'watchers',
|
||||||
|
title = 'Watchers';
|
||||||
UsersScreen.members(String login)
|
UsersScreen.members(String login)
|
||||||
: scope = 'organization',
|
: scope = 'organization',
|
||||||
params = 'login: "$login"',
|
params = 'login: "$login"',
|
||||||
resource = 'membersWithRole';
|
resource = 'membersWithRole',
|
||||||
|
title = 'Members';
|
||||||
|
|
||||||
Future<ListPayload> _queryUsers(BuildContext context, [String cursor]) async {
|
Future<ListPayload> _queryUsers(BuildContext context, [String cursor]) async {
|
||||||
var cursorChunk = cursor == null ? '' : ', after: "$cursor"';
|
var cursorChunk = cursor == null ? '' : ', after: "$cursor"';
|
||||||
@ -64,7 +70,7 @@ class UsersScreen extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return ListScaffold(
|
return ListScaffold(
|
||||||
title: AppBarTitle('Users'),
|
title: AppBarTitle(title),
|
||||||
onRefresh: () => _queryUsers(context),
|
onRefresh: () => _queryUsers(context),
|
||||||
onLoadMore: (cursor) => _queryUsers(context, cursor),
|
onLoadMore: (cursor) => _queryUsers(context, cursor),
|
||||||
itemBuilder: (payload) => UserItem(
|
itemBuilder: (payload) => UserItem(
|
||||||
|
Loading…
Reference in New Issue
Block a user