Advertisement
Guest User

Untitled

a guest
Jul 20th, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. class AlbumPersist @Inject constructor(val context: Context) : CacheInterface<Album> {
  2.  
  3. private var albumDao: AlbumDao = MainDatabase.getDatabase(context).postDao()
  4.  
  5. @WorkerThread
  6. override suspend fun save(items: List<Album>) {
  7. albumDao.save(items)
  8. }
  9. override fun load(): LiveData<List<Album>> {
  10. return albumDao.load()
  11. }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement