Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

App config premium user ad deactivation and local ads tab order synchronization #84

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

@fulleni
Copy link
Member

@fulleni fulleni commented Sep 23, 2025
edited
Loading

Status

READY

Description

This pull request focuses on enhancing the application's ad configuration management and improving UI consistency. It introduces robust mechanisms to prevent premium users from encountering ads by programmatically enforcing zero ad frequency and placement intervals, alongside disabling relevant UI elements. Additionally, it standardizes the order of ad type tabs in the local ads management section for a more predictable user experience. Minor dependency updates are also included.

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • 🛠️ Bug fix (non-breaking change which fixes an issue)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactor
  • ✅ Build configuration change
  • 📝 Documentation
  • 🗑️ Chore

- Add 'enabled' parameter to AppConfigIntField widget
- Allow control over the input field's editability
- Update TextFormField to use the new 'enabled' parameter
- Add listener to tab controller to enforce business rule for premium users
- Disable ad frequency and placement interval fields for premium users
- Ensure premium user ad frequency and placement interval are always set to 0
- Update comments to clarify reasoning for disabled fields
- Disable and safeguard interstitial ad frequency settings for premium users
- Automatically set frequency to 0 when premium user tab is selected
- Add listener to tab controller for real-time updates
- Introduce a static list `_tabs` to define the order of ad types
- Update `TabController` length and `TabBar` tabs to use `_tabs` instead of `AdType.values`
- Modify `TabBarView` children to use `_tabs` for consistent tab order
- Update core.git resolved-ref from dd37d11 to b6a3fb4
- Upgrade go_router from 16.2.1 to 16.2.2
- Upgrade shared_preferences_android from 2.4.12 to 2.4.13
Copy link

Summary of Changes

Hello @fulleni, I'm Gemini Code Assist1 ! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on enhancing the application's ad configuration management and improving UI consistency. It introduces robust mechanisms to prevent premium users from encountering ads by programmatically enforcing zero ad frequency and placement intervals, alongside disabling relevant UI elements. Additionally, it standardizes the order of ad type tabs in the local ads management section for a more predictable user experience. Minor dependency updates are also included.

Highlights

  • Premium User Ad Deactivation: Implemented logic to automatically set ad frequencies and placement intervals to zero for premium users within the app configuration forms. This ensures that premium users do not see ads, reinforcing the business rule. The relevant input fields for premium users are now disabled in the UI, with a safeguard in the configuration update methods to hardcode these values to zero.
  • Local Ads Tab Order Synchronization: Standardized the display order of ad type tabs (Native, Banner, Interstitial, Video) in the archived local ads management page. This is achieved by introducing a static list of AdType values, ensuring a consistent and predictable tab arrangement.
  • Dependency Updates: Updated the go_router package from version 16.2.1 to 16.2.2 and shared_preferences_android from 2.4.12 to 2.4.13. The resolved-ref for the core package in pubspec.lock was also updated.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request effectively implements the deactivation of ad settings for premium users and stabilizes the tab order for local ads. The changes are logical and well-implemented.

I've made a couple of suggestions to simplify the copyWith chains in feed_ad_settings_form.dart and interstitial_ad_settings_form.dart for better readability and conciseness.

Additionally, I noticed that the _onTabChanged method logic is duplicated across _FeedAdSettingsFormState and _InterstitialAdSettingsFormState. While the specific properties being updated are different, the overall structure is identical. For future refactoring, consider abstracting this logic into a shared utility function or a mixin to improve maintainability and reduce code duplication.

Overall, great work on this refactor!

@fulleni fulleni merged commit 078ae68 into main Sep 23, 2025
1 check failed
@fulleni fulleni deleted the app-config-Premium-User-Ad-Deactivation-and-local-ads-Tab-Order-Synchronization branch September 23, 2025 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer

@gemini-code-assist gemini-code-assist[bot] gemini-code-assist[bot] left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /