Merge branch 'dev' of https://gitlab.com/Didvan/didvan-app into dev
This commit is contained in:
commit
42a491e56b
|
|
@ -34,7 +34,7 @@ class RequestHelper {
|
||||||
_urlConcatGenerator([
|
_urlConcatGenerator([
|
||||||
MapEntry('limit', limit?.toString() ?? '3'),
|
MapEntry('limit', limit?.toString() ?? '3'),
|
||||||
MapEntry('type', type),
|
MapEntry('type', type),
|
||||||
MapEntry('id', itemId.toString()),
|
MapEntry('id', itemId?.toString()),
|
||||||
MapEntry('tags', _urlListConcatGenerator(ids))
|
MapEntry('tags', _urlListConcatGenerator(ids))
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,12 +28,19 @@ class _HashtagState extends State<Hashtag> {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return DidvanScaffold(
|
return DidvanScaffold(
|
||||||
appBarData: AppBarData(title: widget.tag.label, hasBack: true),
|
appBarData: AppBarData(title: '#' + widget.tag.label, hasBack: true),
|
||||||
slivers: [
|
slivers: [
|
||||||
Consumer<HashtagState>(
|
Consumer<HashtagState>(
|
||||||
builder: (context, state, child) => SliverStateHandler<HashtagState>(
|
builder: (context, state, child) => SliverStateHandler<HashtagState>(
|
||||||
|
itemPadding: const EdgeInsets.only(bottom: 8),
|
||||||
state: state,
|
state: state,
|
||||||
|
placeholder: RadarOverview.placeholder,
|
||||||
builder: (context, state, index) {
|
builder: (context, state, index) {
|
||||||
|
index++;
|
||||||
|
if (index % 15 == 0 && index / 15 >= state.page) {
|
||||||
|
state.getTagItems(page: index ~/ 15 + 1);
|
||||||
|
}
|
||||||
|
index--;
|
||||||
final item = state.items[index];
|
final item = state.items[index];
|
||||||
final type = item.type;
|
final type = item.type;
|
||||||
if (type == 'radar') {
|
if (type == 'radar') {
|
||||||
|
|
@ -51,7 +58,7 @@ class _HashtagState extends State<Hashtag> {
|
||||||
return Container();
|
return Container();
|
||||||
},
|
},
|
||||||
childCount: state.items.length,
|
childCount: state.items.length,
|
||||||
onRetry: () {},
|
onRetry: () => state.getTagItems(page: 1),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,8 @@ class HashtagState extends CoreProvier {
|
||||||
}
|
}
|
||||||
final service = RequestService(RequestHelper.tag(
|
final service = RequestService(RequestHelper.tag(
|
||||||
ids: [id],
|
ids: [id],
|
||||||
|
itemId: 1,
|
||||||
|
type: 'radar',
|
||||||
limit: 15,
|
limit: 15,
|
||||||
page: page,
|
page: page,
|
||||||
));
|
));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue