Releases: jordond/connectivity
Releases · jordond/connectivity
2.4.1
2.4.0
2.3.0
2.2.1
2.2.0
What's Changed
- chore(deps): update dependency gradle to v9 by @renovate[bot] in #167
- fix(deps): update agp to v8.12.0 by @renovate[bot] in #166
- fix(deps): update Kotlin to 2.2.0 by @renovate[bot] in #152
- Add tvOS Simulator Arm64 support to Multiplatform configuration by @sajidalidev in https://github.com/jordond/connectivity/
- chore: update build configuration and Android SDK by @jordond in #170
Note: Changed to be compiled with Java 17, but target Java 11
New Contributors
- @sajidalidev made their first contribution in #169
Full Changelog: 2.1.0...2.2.0
2.1.0
2.0.2
2.0.1
2.0.0
What's Changed
- Feature: Add tests for core functionality by @jordond in #95
- Fix memory leak by cancel job in Coroutine scope by @aptech73 in #104
- fix(deps): update kotlin to v2.1.20 by @renovate in #116
- Chore: Remove deprecated Connectivity code by @jordond in #92
- Tests: Add tests for core functionality by @jordond in #9
BREAKING CHANGES
- Removed
Connectivity.Updateclass,Connectivity.updatesflow andConnectivity.activeUpdates.- This class was removed so you need to use
Connectivity.status - To get the monitoring status use
Connectivity.monitoringorConnectivity.isMonitoring.
- This class was removed so you need to use
Connectivity.isMonitoring: StateFlow<Boolean>renamed toConnectivity.monitoring- Added
Connectivity.isMonitoring: Booleanto replace theisMonitoringfromConnectivity.Update
Migration
If you were using Connectivity.updates you need to migrate to the following:
// Old
connectivity.updates.collect { update ->
updateState { state ->
state.copy(
monitoring = update.isActive,
status = update,
)
}
}
// New
connectivity.statusUpdates.collect { status ->
updateState { state ->
state.copy(status = update, monitoring = connectivity.isMonitoring)
}
}If you need to also reactively update the monitoring status as well, you can do the following:
launch {
connectivity.statusUpdates.collect { status ->
updateState { state -> state.copy(status = update) }
}
}
launch {
connectivity.monitoring.collect { isMonitoring ->
updateState { state -> state.copy(monitoring = isMonitoring) }
}
}Or you can use Flow.merge:
connectivity.monitoring.combine(connectivity.statusUpdates) { isMonitoring, status ->
updateState { state ->
state.copy(status = update, monitoring = isMonitoring)
}
}.collect()Dependencies
- fix(deps): update kotlin to v2.1.20 by @renovate in #116
- fix(deps): update agp to v8.9.2 by @renovate in #127
- chore(deps): update dependency dev.drewhamilton.poko to v0.18.6 by @renovate in #126
- fix(deps): update kotlin coroutines to v1.10.2 by @renovate in #122
- fix(deps): update ktor monorepo to v3.1.2 by @renovate in #120
- chore(deps): update dependency gradle to v8.14 by @renovate in #130
New Contributors
Full Changelog: 1.2.0...2.0.0-beta01
2.0.0-beta01
What's Changed
- Feature: Add tests for core functionality by @jordond in #95
- Fix memory leak by cancel job in Coroutine scope by @aptech73 in #104
- fix(deps): update kotlin to v2.1.20 by @renovate in #116
- Chore: Remove deprecated Connectivity code by @jordond in #92
BREAKING CHANGES
- Removed
Connectivity.Updateclass,Connectivity.updatesflow andConnectivity.activeUpdates.- This class was removed so you need to use
Connectivity.status - To get the monitoring status use
Connectivity.monitoringorConnectivity.isMonitoring.
- This class was removed so you need to use
Connectivity.isMonitoring: StateFlow<Boolean>renamed toConnectivity.monitoring- Added
Connectivity.isMonitoring: Booleanto replace theisMonitoringfromConnectivity.Update
Migration
If you were using Connectivity.updates you need to migrate to the following:
// Old
connectivity.updates.collect { update ->
updateState { state ->
state.copy(
monitoring = update.isActive,
status = update,
)
}
}
// New
connectivity.statusUpdates.collect { status ->
updateState { state ->
state.copy(status = update, monitoring = connectivity.isMonitoring)
}
}If you need to also reactively update the monitoring status as well, you can do the following:
launch {
connectivity.statusUpdates.collect { status ->
updateState { state -> state.copy(status = update) }
}
}
launch {
connectivity.monitoring.collect { isMonitoring ->
updateState { state -> state.copy(monitoring = isMonitoring) }
}
}Or you can use Flow.merge:
connectivity.monitoring.combine(connectivity.statusUpdates) { isMonitoring, status ->
updateState { state ->
state.copy(status = update, monitoring = isMonitoring)
}
}.collect()Dependencies
- chore(deps): update dependency dev.drewhamilton.poko to v0.18.2 by @renovate in #91
- chore(deps): update dependency org.jetbrains.dokka to v2 by @renovate in #88
- fix(deps): update ktor monorepo to v3.1.1 by @renovate in #106
- fix(deps): update dependency androidx.activity:activity-ktx to v1.10.1 by @renovate in #113
- fix(deps): update dependency androidx.activity:activity-compose to v1.10.1 by @renovate in #112
- chore(deps): update plugin com.gradle.develocity to v3.19.2 by @renovate in #110
- fix(deps): update dependency androidx.fragment:fragment-ktx to v1.8.6 by @renovate in #107
- chore(deps): update dependency gradle to v8.13 by @renovate in #111
- fix(deps): update publish to v0.31.0 by @renovate in #115
- fix(deps): update agp to v8.9.1 by @renovate in #117
New Contributors
Full Changelog: 1.2.0...2.0.0-beta01