0.6.11 - noone cares or reads this anyway, the repo is for issues, and the code so bad, it's practically obfuscated

This commit is contained in:
exttex 2021-04-16 20:21:35 +02:00
parent 9f850a6f30
commit aa7f82b399
11 changed files with 111 additions and 31 deletions

View file

@ -634,14 +634,19 @@ class HomePageSection {
);
String layout = json['layout'];
//No ads there
if (layout == 'ads') return null;
if (layout == 'horizontal-grid' || layout == 'grid') {
hps.layout = HomePageSectionLayout.ROW;
} else {
//Currently only row layout
return null;
switch (layout) {
case 'ads':
return null;
case 'horizontal-grid':
hps.layout = HomePageSectionLayout.ROW;
break;
case 'grid':
hps.layout = HomePageSectionLayout.GRID;
break;
default:
return null;
}
//Parse items
for (var i in (json['items']??[])) {
HomePageItem hpi = HomePageItem.fromPrivateJson(i);
@ -747,7 +752,8 @@ enum HomePageItemType {
}
enum HomePageSectionLayout {
ROW
ROW,
GRID
}
enum RepeatType {