Skip to content

Commit

Permalink
feat(categories): Reenable Featured playlists
Browse files Browse the repository at this point in the history
  • Loading branch information
KRTirtho committed Oct 9, 2022
1 parent 0653dab commit 6d4c6b1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CONTRIBUTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ All types of contributions are encouraged and valued. See the [Table of Contents
- [Before Submitting a Bug Report](#before-submitting-a-bug-report)
- [How Do I Submit a Good Bug Report?](#how-do-i-submit-a-good-bug-report)
- [Suggesting Enhancements](#suggesting-enhancements)
- [Before Submitting an Enhancement](#before-submitting-an-enhancement)
- [How Do I Submit a Good Enhancement Suggestion?](#how-do-i-submit-a-good-enhancement-suggestion)
- [Your First Code Contribution](#your-first-code-contribution)

## Code of Conduct
Expand Down Expand Up @@ -120,6 +122,7 @@ Do the following:
- Install Development dependencies in linux
- `libgstreamer1.0-dev` & `libgstreamer-plugins-base1.0-dev` (for Debian/Ubuntu)
- `gstreamer`, `gst-libav`, `gst-plugins-base` & `gst-plugins-good` (for Arch/Manjaro)
- `gstreamer1-devel gstreamer1-plugins-base-tools gstreamer1-doc gstreamer1-plugins-base-devel gstreamer1-plugins-good gstreamer1-plugins-good-extras` (for Fedora)
- Clone the Repo & Run `flutter pub get` in the Terminal
- Create a `secrets.json` in root of the project. The structure should be similar to the following example:

Expand Down
18 changes: 13 additions & 5 deletions lib/components/Home/Home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,19 @@ class Home extends HookConsumerWidget {
},
);

final categories = categoriesQuery.pages
.expand<Category?>(
(page) => page?.items ?? const Iterable.empty(),
)
.toList();
final categories = [
useMemoized(
() => Category()
..id = "user-featured-playlists"
..name = "Featured",
[],
),
...categoriesQuery.pages
.expand<Category?>(
(page) => page?.items ?? const Iterable.empty(),
)
.toList()
];

return ListView.builder(
itemCount: categories.length,
Expand Down

0 comments on commit 6d4c6b1

Please sign in to comment.