package Ġcom . b alys v . ver yn iced rink s . domain . wh is ky Ċ Ċ import Ġcom . b alys v . ver yn iced rink s . infrastructure . db . dao . Wh is ky Dao Ċ import Ġcom . f 2 pr ate ek . rx . preferences 2 . Preference Ċ import Ġcom . f 2 pr ate ek . rx . preferences 2 . Rx SharedPreferences Ċ import Ġdagger . Module Ċ import Ġdagger . Provides Ċ import Ġdagger . Sub component Ċ import Ġjavax . inject . Qualifier Ċ import Ġjavax . inject . Scope Ċ Ċ @ Qualifier Ċ @ Retention ( Annotation Retention . RUNTIME ) Ċ @ Scope Ċ annotation Ġclass ĠWh is ky Repository Scope Ċ Ċ @ Wh is ky Repository Scope Ċ @ Sub component ( modules Ġ= ĠarrayOf ( Wh is ky Repository Module :: class )) Ċ interface ĠWh is ky Repository Component Ġ{ ĊĠ Ġ@ Wh is ky Repository Scope ĊĠ Ġfun Ġwh is ky Repository (): ĠWh is ky Repository ĊĊĠ Ġ@ Sub component . Builder ĊĠ Ġinterface ĠBuilder Ġ{ ĊĠĠĠ Ġfun Ġmodule ( module : ĠWh is ky Repository Module ): ĠBuilder ĊĠĠĠ Ġfun Ġbuild (): ĠWh is ky Repository Component ĊĠ Ġ} Ċ } Ċ Ċ @ Module Ċ class ĠWh is ky Repository Module Ġ{ ĊĊĠ Ġ@ Provides ĊĠ Ġfun Ġis Wh is ky Database Loaded ( prefs : ĠRx SharedPreferences ): ĠPreference < Boolean > Ġ= ĊĠĠĠ Ġprefs . getBoolean (" wh is ky _ db _ loaded ", Ġfalse ) ĊĊĠ Ġ@ Provides ĊĠ Ġ@ Wh is ky Repository Scope ĊĠ Ġfun Ġwh is ky Repository Impl ( dao : ĠWh is ky Dao , Ġis Db Loaded : ĠPreference < Boolean >): ĠWh is ky Repository ĊĠĠĠ Ġ= ĠWh is ky Repository Impl ( dao , Ġis Db Loaded ) Ċ } Ċ