Skip to content

feat: Hide Others section (watch order, op/ed, news) on anime details…#351

Merged
RyanYuuki merged 5 commits intoRyanYuuki:mainfrom
Neoniq:hide-others-when-simkl
Mar 12, 2026
Merged

feat: Hide Others section (watch order, op/ed, news) on anime details…#351
RyanYuuki merged 5 commits intoRyanYuuki:mainfrom
Neoniq:hide-others-when-simkl

Conversation

@Neoniq
Copy link
Contributor

@Neoniq Neoniq commented Mar 9, 2026

… when service is Simkl

Before

image

After image

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the anime details UI to hide the “Others” section (watch order, OP/ED, news) when the current media/service is Simkl, aligning the details page content with what Simkl supports.

Changes:

  • Add a serviceType parameter to AnimeStats so it can conditionally render the “Others” section.
  • Pass widget.media.serviceType from AnimeDetailsPage into AnimeStats.
  • Gate rendering of _buildOthersSection and its spacing when serviceType == ServicesType.simkl.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
lib/screens/anime/widgets/anime_stats.dart Adds service-type-based conditional rendering to hide the “Others” section for Simkl.
lib/screens/anime/details_page.dart Passes the media’s serviceType into AnimeStats to drive the new conditional behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +162 to +167
if (serviceType != null &&
(serviceType != ServicesType.simkl))
_buildOthersSection(context),
if (serviceType != null &&
(serviceType != ServicesType.simkl))
const SizedBox(height: 16),
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AnimeStats already has data: Media, and Media.serviceType is non-null/required. Adding a separate nullable serviceType prop creates a second source of truth and the repeated if (serviceType != null && serviceType != ServicesType.simkl) blocks duplicate logic. Consider using data.serviceType (or the existing local isSimkl) and collapsing this into a single conditional block (e.g., a single if with a spread list) so the section behavior stays consistent and null defaults don’t accidentally hide the section in other call sites.

Copilot uses AI. Check for mistakes.
@Shebyyy Shebyyy requested a review from RyanYuuki March 10, 2026 01:36
@RyanYuuki
Copy link
Owner

Reduce the spacing while you're at it

@itsmechinmoy
Copy link
Collaborator

can you do one more thing? like change recommended animes to shows/movies based on type

@Neoniq
Copy link
Contributor Author

Neoniq commented Mar 11, 2026

@itsmechinmoy done @RyanYuuki
image

@Neoniq
Copy link
Contributor Author

Neoniq commented Mar 11, 2026

569b2f8
image


1bc03ba
image
image

@RyanYuuki RyanYuuki merged commit 42a3fc6 into RyanYuuki:main Mar 12, 2026
1 check passed
@Neoniq Neoniq deleted the hide-others-when-simkl branch March 13, 2026 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants