package Ġio . github . d roid ka igi . conf sched 2 0 1 9 . session . ui . store Ċ Ċ import Ġio . github . d roid ka igi . conf sched 2 0 1 9 . action . Action Ċ import Ġio . github . d roid ka igi . conf sched 2 0 1 9 . dispatcher . Dispatcher Ċ import Ġio . github . d roid ka igi . conf sched 2 0 1 9 . ext . to LiveData Ċ import Ġio . github . d roid ka igi . conf sched 2 0 1 9 . model . SearchResult Ċ import Ġio . github . d roid ka igi . conf sched 2 0 1 9 . store . Store Ċ import Ġkotlinx . coroutines . channels . map Ċ import Ġjavax . inject . Inject Ċ Ċ class ĠSearch Store Ġ@ Inject Ġconstructor ( ĊĠĠĠ Ġdispatcher : ĠDispatcher Ċ ) Ġ: ĠStore () Ġ{ ĊĠĠĠ Ġval Ġquery Ġget () Ġ= Ġsearch Result . value ?. query ĊĊĠĠĠ Ġval Ġsearch Result Ġ= Ġdispatcher ĊĠĠĠĠĠĠĠ Ġ. subscribe < Action . SearchResult Loaded >() ĊĠĠĠĠĠĠĠ Ġ. map Ġ{ Ġit . search Result Ġ} ĊĠĠĠĠĠĠĠ Ġ. to LiveData ( this , ĠSearch Result . EMPTY ) Ċ } Ċ