This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ProfileRepository @Inject internal constructor(private val profileDao: ProfileDao): ProfileRepo{ | |
override fun isProfileRepoEmpty(): Observable<Boolean> = Observable.fromCallable{ profileDao.loadAllProfiles().isEmpty() } | |
override fun insertProfile(profile: Profile) : Observable<Boolean>{ | |
AppConstants.AUTH_TOKEN = profile.accessToken | |
AsyncTask.execute { profileDao.insertProfile(profile) } | |
return Observable.just(true) | |
} |