8000 Releases · jordond/connectivity · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Releases: jordond/connectivity

2.0.1

07 May 21:20
Compare
Choose a tag to compare

Dependencies

Full Changelog: 2.0.0...2.0.1

2.0.0

26 Apr 14:40
434c781
Compare
Choose a tag to compare

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.Update class, Connectivity.updates flow and Connectivity.activeUpdates.
    • This class was removed so you need to use Connectivity.status
    • To get the monitoring status use Connectivity.monitoring or Connectivity.isMonitoring.
  • Connectivity.isMonitoring: StateFlow<Boolean> renamed to Connectivity.monitoring
  • Added Connectivity.isMonitoring: Boolean to replace the isMonitoring from Connectivity.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

25 Mar 19:41
4021014
Compare
Choose a tag to compare
2.0.0-beta01 Pre-release
Pre-release

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.Update class, Connectivity.updates flow and Connectivity.activeUpdates.
    • This class was removed so you need to use Connectivity.status
    • To get the monitoring status use Connectivity.monitoring or Connectivity.isMonitoring.
  • Connectivity.isMonitoring: StateFlow<Boolean> renamed to Connectivity.monitoring
  • Added Connectivity.isMonitoring: Boolean to replace the isMonitoring from Connectivity.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

1.2.0

03 Dec 17:31
4f5d1ee
Compare
Choose a tag to compare

What's Changed

  • Kotlin 2.1.0 🎉
  • Compose Multiplatform 1.7.1
  • AGP to 8.7.3
  • Android Fix - Registering for default network by @DanicMa in #81
  • Android compile and target SDK to 35

New Contributors

Full Changelog: 1.1.3...1.2.0

1.1.3

28 Oct 15:56
Compare
Choose a tag to compare

What's Changed

Highlights:

  • Kotlin 2.0.21
  • Ktor 3.0.0
  • Gradle 8.10.2

This release removes the dependency on the experimental version of Ktor, and now uses the stable 3.0 release.

New Contributors

Full Changelog: 1.1.2...1.1.3

1.1.2

25 Jun 16:25
aac71b3
Compare
Choose a tag to compare

What's Changed

If you target iOS and you use the device artifact. It is highly recommended to update to this version. As the previous version has a bug where status updates are not emitted.

Dependencies

Full Changelog: 1.1.1...1.1.2

1.1.1

18 Jun 17:37
bb338db
Compare
Choose a tag to compare

What's Changed

Dependencies

  • Update dependency co.touchlab:kermit to v2.0.4 by @renovate in #12
  • Update compose to v1.6.8 by @renovate in #13
  • Update dependency androidx.lifecycle:lifecycle-runtime-ktx to v2.8.2 - autoclosed by @renovate in #14
  • Update plugin com.gradle.develocity to v3.17.5 by @renovate in #15
  • Update dependency androidx.fragment:fragment-ktx to v1.8.0 by @renovate in #16
  • Update agp to v8.5.0 by @renovate in #17

Full Changelog: 1.1.0...1.1.1

1.1.0

10 Jun 18:24
Compare
Choose a tag to compare

What's Changed

  • Feature: Switch to a SharedFlow for network status by @jordond in #9
  • Feature: Add Compose Multiplatform support by @jordond in #11

Dependencies

Full Changelog: 1.0.1...1.1.0

1.0.1

09 Jun 16:57
Compare
Choose a tag to compare

What's Changed?

  • Fix module export

Full Changelog: 1.0.0...1.0.1

1.0.0

08 Jun 00:55
14bfeeb
Compare
Choose a tag to compare

Initial Release

  • Network monitoring
  • Network status
  • Native device support (Apple, Android)
  • All platform support via HTTP requests
0