package Ġorg . j dc . template . model . repository Ċ Ċ import Ġkotlinx . coroutines . flow . Flow Ċ import Ġkotlinx . coroutines . flow . first Ċ import Ġorg . j dc . template . model . datastore . Device Preference DataSource Ċ import Ġorg . j dc . template . model . datastore . User Preference DataSource Ċ import Ġorg . j dc . template . model . data . Display Theme Type Ċ import Ġjavax . inject . Inject Ċ import Ġjavax . inject . Singleton Ċ Ċ @ Singleton Ċ class ĠSettings Repository Ċ @ Inject Ġconstructor ( ĊĠĠĠ Ġprivate Ġval Ġuser Preference DataSource : ĠUser Preference DataSource , ĊĠĠĠ Ġprivate Ġval Ġdevice Preference DataSource : ĠDevice Preference DataSource Ċ ) Ġ{ ĊĠĠĠ Ġval Ġtheme Flow : ĠFlow < Display Theme Type > Ġget () Ġ= Ġdevice Preference DataSource . theme Flow ĊĠĠĠ Ġsuspend Ġfun Ġset Theme ( theme : ĠDisplay Theme Type ) Ġ{ ĊĠĠĠĠĠĠĠ Ġdevice Preference DataSource . set Theme ( theme ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġis Developer Mode Enabled (): ĠBoolean Ġ= Ġdevice Preference DataSource . developer Mode Flow . first () ĊĠĠĠ Ġsuspend Ġfun Ġset Developer Mode ( enabled : ĠBoolean ) Ġ{ ĊĠĠĠĠĠĠĠ Ġdevice Preference DataSource . set Developer Mode ( enabled ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġget App InstanceId (): ĠString Ġ= Ġdevice Preference DataSource . app InstanceId Flow . first () ĊĊĠĠĠ Ġsuspend Ġfun ĠgetLast Installed Version Code (): ĠInt Ġ= Ġdevice Preference DataSource . last Installed Version Code Flow . first () ĊĠĠĠ Ġsuspend Ġfun Ġset Last Installed Version Code ( version : ĠInt ) Ġ{ ĊĠĠĠĠĠĠĠ Ġdevice Preference DataSource . set Last Installed Version Code ( version ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġget Work Scheduler Version (): ĠInt Ġ= Ġdevice Preference DataSource . work Scheduler Version Flow . first () ĊĠĠĠ Ġsuspend Ġfun Ġset Work Scheduler Version ( version : ĠInt ) Ġ{ ĊĠĠĠĠĠĠĠ Ġdevice Preference DataSource . set Work Scheduler Version ( version ) ĊĠĠĠ Ġ} Ċ Ċ } Ċ