Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class AlbumPersist @Inject constructor(val context: Context) : CacheInterface<Album> {
- private var albumDao: AlbumDao = MainDatabase.getDatabase(context).postDao()
- @WorkerThread
- override suspend fun save(items: List<Album>) {
- albumDao.save(items)
- }
- override fun load(): LiveData<List<Album>> {
- return albumDao.load()
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement