package Ġcom . km man ia . running user preferences . user _ prefs Ċ Ċ import Ġandroidx . annotation . Worker Thread Ċ import Ġkotlinx . coroutines . flow . Flow Ċ import Ġjavax . inject . Inject Ċ import Ġjavax . inject . Singleton Ċ Ċ @ Singleton Ċ class ĠUser Prefs Repository Ġ@ Inject Ġconstructor ( private Ġval Ġuser Prefs Dao : ĠUser Prefs Dao ) Ġ{ ĊĠĠĠ Ġval Ġuser Prefs Value : ĠFlow < User Prefs > Ġ= Ġuser Prefs Dao . getUser Prefs () ĊĊĠĠĠ Ġ@ Suppress (" Red undant Suspend Modifier ") ĊĠĠĠ Ġ@ Worker Thread ĊĠĠĠ Ġsuspend Ġfun Ġinsert ( user Prefs : ĠUser Prefs ) Ġ{ ĊĠĠĠĠĠĠĠ Ġuser Prefs Dao . delete All () ĊĠĠĠĠĠĠĠ Ġuser Prefs Dao . insert ( user Prefs ) ĊĠĠĠ Ġ} Ċ }