Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Sep 27, 2025

This PR addresses the remaining items from issue #3461 by replacing all direct platform-specific icon usage with the centralized platformPrefixIconName helper function introduced in PR #3459.

Problem

Throughout the codebase, icons were being handled with direct platform checks like:

const iconName = Platform.OS === 'ios' ? 'ios-heart' : 'md-heart'

This pattern was repeated across multiple files, leading to code duplication and inconsistent icon handling.

Solution

Replaced all remaining platform-specific icon usage with calls to the platformPrefixIconName helper:

// Before
const iconName = Platform.OS === 'ios' ? 'ios-heart' : 'md-heart'

// After  
const iconName = platformPrefixIconName('heart')

Files Changed

Updated 10 files across the codebase:

  • Streaming radio components: Updated controller and button icons (planet, play, pause, bug, call, calendar)
  • Food menu components: Updated star icon for special items
  • Filter components: Updated chevron-down and close-circle icons
  • Navigation buttons: Updated search-outline, heart, and heart-outline icons
  • StoPrint components: Updated print and bug error icons
  • SIS components: Updated warning icon

Benefits

  • Centralized logic: All platform-specific icon resolution now happens in one place
  • Consistency: Uniform icon handling across the entire codebase
  • Maintainability: Future icon changes only need to be made in the helper function
  • Reduced duplication: Eliminates repetitive platform checks

The helper function intelligently chooses the correct icon variant based on platform availability, ensuring consistent behavior across iOS and Android while maintaining all existing functionality.

Closes #3461

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • downloads.sentry-cdn.com
    • Triggering command: node ./scripts/install.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Please look at @StoDevX/AAO-React-Native/issues/3461 and make sure that all platform-specific icons use the mentioned helper.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Please look at @StoDevX/AAO-React-Native/issues/3461 and make sure that all platform-specific icons use the mentioned helper. Replace platform-specific icon usage with platformPrefixIconName helper Sep 27, 2025
Copilot AI requested a review from hawkrives September 27, 2025 02:09
Copilot finished work on behalf of hawkrives September 27, 2025 02:09
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.

Followups for the rn-vector-icons@6 upgrade

3 participants