meshtastic / Meshtastic-Android

Android application for Meshtastic
https://meshtastic.org
GNU General Public License v3.0
743 stars 212 forks source link

refactor: Migrate Node dropdown menu to Compose #1386

Closed jamesarich closed 1 week ago

jamesarich commented 2 weeks ago

Migrated the Nodes dropdown menu to Compose, replacing the old XML-based UI. This change improves the maintainability and flexibility of the UI, allowing for more dynamic and interactive elements. It also simplifies the codebase by reducing the need for separate XML menu.

The refactoring includes:

Screen_recording_20241106_192131.webm

jamesarich commented 2 weeks ago

Thanks for the review, was noticing that the dropdown wasn't anchored to the chip and went on a refactoring spree 😅 . I'll get it cleaned up.

jamesarich commented 2 weeks ago

As per discord discussion:

using "isConnected = model.isConnected()" wont trigger recompositions when connection state changes it needs to collect the state directly or in the nodesUiState