JuulLabs / able

Able: Android Bluetooth Low Energy library
Apache License 2.0
159 stars 11 forks source link

Have onConnectionStateChange backed by StateFlow #66

Closed twyatt closed 4 years ago

twyatt commented 4 years ago

Changes onConnectionStateChange property to be backed by StateFlow instead of ConflatedBroadcastChannel:

Conceptually state flow is similar to ConflatedBroadcastChannel and is designed to completely replace ConflatedBroadcastChannel in the future.

codecov[bot] commented 4 years ago

Codecov Report

Merging #66 into develop will increase coverage by 0.23%. The diff coverage is 100.00%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop      #66      +/-   ##
=============================================
+ Coverage      80.46%   80.70%   +0.23%     
  Complexity        36       36              
=============================================
  Files             13       13              
  Lines            256      254       -2     
  Branches          28       26       -2     
=============================================
- Hits             206      205       -1     
+ Misses            43       42       -1     
  Partials           7        7              
Impacted Files Coverage Δ Complexity Δ
core/src/main/java/gatt/CoroutinesGatt.kt 50.00% <100.00%> (ø) 10.00 <1.00> (ø)
core/src/main/java/gatt/GattCallback.kt 84.61% <100.00%> (+0.83%) 17.00 <1.00> (ø)
core/src/main/java/gatt/GattConnection.kt 100.00% <100.00%> (ø) 0.00 <0.00> (ø)
core/src/main/java/gatt/Events.kt 81.69% <0.00%> (+1.40%) 0.00% <0.00%> (ø%)