package Ġcom . o jh dt app . action . ui . archive Ċ Ċ import Ġandroidx . lifecycle . LiveData Ċ import Ġandroidx . lifecycle . Mutable LiveData Ċ import Ġandroidx . lifecycle . Transform ations Ċ import Ġandroidx . lifecycle . ViewModel Ċ import Ġcom . o jh dt app . action . logic . Repository Ċ import Ġcom . o jh dt app . action . logic . model . Action Ċ Ċ class ĠAction Archive ViewModel Ġ: ĠViewModel () Ġ{ ĊĠĠĠ Ġprivate Ġval Ġ_ action Live Ġ= ĠMutable LiveData < Mutable List < Action >>() ĊĠĠĠ Ġprivate Ġval Ġ_ action Tran : ĠLive Data < List < Action >> Ġ= ĊĠĠĠĠĠĠĠ ĠTransform ations . switch Map (_ action Live ) Ġ{ ĠRepository . get Activated Action Live () Ġ} ĊĠĠĠ Ġval Ġaction Live : ĠLive Data < List < Action >> Ġget () Ġ= Ġ_ action Tran ĊĊĠĠĠ Ġfun Ġaction Refresh (){ ĊĠĠĠĠĠĠĠ Ġ_ action Live . value Ġ= Ġ_ action Live . value ĊĠĠĠ Ġ} Ċ }