BasedHardware / omi

AI wearables
https://omi.me
MIT License
3.64k stars 460 forks source link

Validate persitent device id before auto connect #852

Closed beastoin closed 1 month ago

beastoin commented 1 month ago

Summary by Entelligence.AI

github-actions[bot] commented 1 month ago

Image description Entelligence.AI

Walkthrough

This update enhances the disconnection process in various files by making it asynchronous, ensuring operations are awaited before proceeding. Additionally, the connection logic in DeviceProvider has been refined to conditionally set the force parameter based on a comparison with a persistent device ID.

Changes

File(s) Summary
app/lib/pages/home/device.dart, app/lib/pages/home/device_settings.dart, app/lib/pages/home/firmware_mixin.dart Modified the disconnect method and related functions to use await, making them asynchronous and ensuring that the disconnection operation is awaited before proceeding.
app/lib/providers/device_provider.dart Updated the connection logic to conditionally set the force parameter based on a comparison with a persistent device ID before establishing a connection.

🎉🤖

In the realm of code where devices connect,

A change was made with profound effect.

Now we wait for tasks to end,

And connections wisely we extend.

Celebrate this update, my friend! 🎉🤖


Uplevel your code reviews with Entelligence.AI Pro ### Entelligence.AI Pro If you like this project, please support us by purchasing the [Pro version](https://Entelligence.AI.ai). The Pro version has advanced context, superior noise reduction and several proprietary improvements compared to the open source version. Moreover, Entelligence.AI Pro is free for open source projects.