Missing scrolling, homepage reload, sections page

This commit is contained in:
exttex 2020-08-16 22:17:22 +02:00
parent d4299f736f
commit 3e5641b3c2
7 changed files with 102 additions and 34 deletions

View file

@ -553,14 +553,24 @@ class HomePageSection {
String title;
HomePageSectionLayout layout;
//For loading more items
String pagePath;
bool hasMore;
@JsonKey(fromJson: _homePageItemFromJson, toJson: _homePageItemToJson)
List<HomePageItem> items;
HomePageSection({this.layout, this.items, this.title});
HomePageSection({this.layout, this.items, this.title, this.pagePath, this.hasMore});
//JSON
factory HomePageSection.fromPrivateJson(Map<dynamic, dynamic> json) {
HomePageSection hps = HomePageSection(title: json['title'], items: []);
HomePageSection hps = HomePageSection(
title: json['title'],
items: [],
pagePath: json['target'],
hasMore: json['hasMoreItems']??false
);
String layout = json['layout'];
//No ads there
if (layout == 'ads') return null;