Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • Briar Desktop Briar Desktop
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 175
    • Issues 175
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 16
    • Merge requests 16
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • briar
  • Briar DesktopBriar Desktop
  • Issues
  • #97

Closed
Open
Created Oct 28, 2021 by Mikolai Gütschow@ialokimMaintainer

Migrate view models from `State` to `StateFlow`

StateFlow as provided by Kotlin coroutines has the following advantages:

  • operations similar to Transformations.map (on LiveData) allow to implicitly update a "state" whose value depends on another one (e.g., currently in ContactListViewModel, we have to update the exposed list by an explicit function call)
  • StateFlow is recommended and used in several places for Jetpack Compose and Compose for Desktop
  • the view models will be independent of the the UI framework and could be re-used for the Android app

We most certainly want to include coroutines as a dependency anyhow, if we want to move all (long-running) Briar API calls to a background thread (in a Kotlin-ish way) > see #98 (closed) .

Edited Oct 28, 2021 by Mikolai Gütschow
Assignee
Assign to
Time tracking