Pedestal Progress 2.3.0 is out! :rocket: Pedesta...
# feed
c
Pedestal Progress 2.3.0 is out! 🚀 Pedestal Progress is a micro-library to represent progress information and share it between functions. It is designed to be very lightweight to allow libraries and frameworks to depend on it without fear of breakage, while still allowing library authors to extend it with any information they would like to report.
Copy code
suspend fun getFriends(): List<User> {
    report(loading(0.0)) // 0%
    val currentUser = findMe()
    report(loading(0.5)) // 50%
    val friends = findFriendsOf(currentUser)
    report(done())
    return friends
}

val logger = ProgressReporter { println("Get friends: $it") }
withContext(logger.asCoroutineContext()) {
    getFriends()
}

// Output:
Get friends: Loading(0%)
Get friends: Loading(50%)
Get friends: Done
Progress is ideal when developing Compose applications to improve UX of long operations. It can also be used without coroutines, if needed. Learn more: documentation • what's new? • #C078Z1QRHL3
🚀 1
🔥 3
K 3