mirror of
https://github.com/git-touch/git-touch
synced 2025-02-21 22:07:51 +01:00
fix: totalcount
This commit is contained in:
parent
6b095e8a3b
commit
0b743ffddb
@ -428,10 +428,12 @@ class PinnableItemConnection with EquatableMixin {
|
|||||||
factory PinnableItemConnection.fromJson(Map<String, dynamic> json) =>
|
factory PinnableItemConnection.fromJson(Map<String, dynamic> json) =>
|
||||||
_$PinnableItemConnectionFromJson(json);
|
_$PinnableItemConnectionFromJson(json);
|
||||||
|
|
||||||
|
int totalCount;
|
||||||
|
|
||||||
List<PinnableItem> nodes;
|
List<PinnableItem> nodes;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
List<Object> get props => [nodes];
|
List<Object> get props => [totalCount, nodes];
|
||||||
Map<String, dynamic> toJson() => _$PinnableItemConnectionToJson(this);
|
Map<String, dynamic> toJson() => _$PinnableItemConnectionToJson(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -891,6 +893,12 @@ class GhUserQuery extends GraphQLQuery<GhUser, GhUserArguments> {
|
|||||||
],
|
],
|
||||||
directives: [],
|
directives: [],
|
||||||
selectionSet: SelectionSetNode(selections: [
|
selectionSet: SelectionSetNode(selections: [
|
||||||
|
FieldNode(
|
||||||
|
name: NameNode(value: 'totalCount'),
|
||||||
|
alias: null,
|
||||||
|
arguments: [],
|
||||||
|
directives: [],
|
||||||
|
selectionSet: null),
|
||||||
FieldNode(
|
FieldNode(
|
||||||
name: NameNode(value: 'nodes'),
|
name: NameNode(value: 'nodes'),
|
||||||
alias: null,
|
alias: null,
|
||||||
|
@ -290,6 +290,7 @@ Map<String, dynamic> _$RepositoryInfoToJson(RepositoryInfo instance) =>
|
|||||||
PinnableItemConnection _$PinnableItemConnectionFromJson(
|
PinnableItemConnection _$PinnableItemConnectionFromJson(
|
||||||
Map<String, dynamic> json) {
|
Map<String, dynamic> json) {
|
||||||
return PinnableItemConnection()
|
return PinnableItemConnection()
|
||||||
|
..totalCount = json['totalCount'] as int
|
||||||
..nodes = (json['nodes'] as List)
|
..nodes = (json['nodes'] as List)
|
||||||
?.map((e) =>
|
?.map((e) =>
|
||||||
e == null ? null : PinnableItem.fromJson(e as Map<String, dynamic>))
|
e == null ? null : PinnableItem.fromJson(e as Map<String, dynamic>))
|
||||||
@ -299,6 +300,7 @@ PinnableItemConnection _$PinnableItemConnectionFromJson(
|
|||||||
Map<String, dynamic> _$PinnableItemConnectionToJson(
|
Map<String, dynamic> _$PinnableItemConnectionToJson(
|
||||||
PinnableItemConnection instance) =>
|
PinnableItemConnection instance) =>
|
||||||
<String, dynamic>{
|
<String, dynamic>{
|
||||||
|
'totalCount': instance.totalCount,
|
||||||
'nodes': instance.nodes?.map((e) => e?.toJson())?.toList(),
|
'nodes': instance.nodes?.map((e) => e?.toJson())?.toList(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -48,6 +48,7 @@ query($login: String!) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
pinnedItems(first: 6) {
|
pinnedItems(first: 6) {
|
||||||
|
totalCount # TODO: Add this for correct generated code
|
||||||
nodes {
|
nodes {
|
||||||
... on Repository {
|
... on Repository {
|
||||||
owner {
|
owner {
|
||||||
|
@ -180,8 +180,7 @@ class UserScreen extends StatelessWidget {
|
|||||||
CommonStyle.border,
|
CommonStyle.border,
|
||||||
Row(children: [
|
Row(children: [
|
||||||
EntryItem(
|
EntryItem(
|
||||||
// count: payload.pinnableItems.totalCount,
|
count: payload.pinnableItems.totalCount,
|
||||||
count: 0, // TODO:
|
|
||||||
text: 'Repositories',
|
text: 'Repositories',
|
||||||
screenBuilder: (context) =>
|
screenBuilder: (context) =>
|
||||||
RepositoriesScreen.ofOrganization(payload.login),
|
RepositoriesScreen.ofOrganization(payload.login),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user