Skip to content

Extract duplicated inDarkMode() helper to UIUtils #1540

@aaronbrethorst

Description

@aaronbrethorst

Problem

inDarkMode() is now duplicated in two map fragment implementations:

  • BaseMapFragment.java (Google Maps variant)
  • MapLibreMapFragment.java (MapLibre variant)

If the dark mode detection logic needs to change (e.g., adding a user preference override), both would need updating independently.

Suggested Fix

Extract inDarkMode() to UIUtils (which already has theme-related helpers) as a static method, then call it from both map fragments.

Context

Noticed during review of #1532, which correctly copied the pattern from BaseMapFragment to MapLibreMapFragment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions