D1APP-104 hashtags (beta) (needs backend bug fix)
This commit is contained in:
parent
2fc98b9355
commit
405326aca6
|
|
@ -34,7 +34,7 @@ class RequestHelper {
|
|||
_urlConcatGenerator([
|
||||
MapEntry('limit', limit?.toString() ?? '3'),
|
||||
MapEntry('type', type),
|
||||
MapEntry('id', itemId.toString()),
|
||||
MapEntry('id', itemId?.toString()),
|
||||
MapEntry('tags', _urlListConcatGenerator(ids))
|
||||
]);
|
||||
|
||||
|
|
|
|||
|
|
@ -28,12 +28,19 @@ class _HashtagState extends State<Hashtag> {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return DidvanScaffold(
|
||||
appBarData: AppBarData(title: widget.tag.label, hasBack: true),
|
||||
appBarData: AppBarData(title: '#' + widget.tag.label, hasBack: true),
|
||||
slivers: [
|
||||
Consumer<HashtagState>(
|
||||
builder: (context, state, child) => SliverStateHandler<HashtagState>(
|
||||
itemPadding: const EdgeInsets.only(bottom: 8),
|
||||
state: state,
|
||||
placeholder: RadarOverview.placeholder,
|
||||
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 type = item.type;
|
||||
if (type == 'radar') {
|
||||
|
|
@ -51,7 +58,7 @@ class _HashtagState extends State<Hashtag> {
|
|||
return Container();
|
||||
},
|
||||
childCount: state.items.length,
|
||||
onRetry: () {},
|
||||
onRetry: () => state.getTagItems(page: 1),
|
||||
),
|
||||
)
|
||||
],
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@ class HashtagState extends CoreProvier {
|
|||
}
|
||||
final service = RequestService(RequestHelper.tag(
|
||||
ids: [id],
|
||||
itemId: 1,
|
||||
type: 'radar',
|
||||
limit: 15,
|
||||
page: page,
|
||||
));
|
||||
|
|
|
|||
Loading…
Reference in New Issue