Skip to content

Instantly share code, notes, and snippets.

@PetkevichPavel
Last active May 3, 2020 22:36
Show Gist options
  • Save PetkevichPavel/d5a690d0d95c83c7be9909013aff9595 to your computer and use it in GitHub Desktop.
Save PetkevichPavel/d5a690d0d95c83c7be9909013aff9595 to your computer and use it in GitHub Desktop.
SharedPreferences under Delegated properties - SomeRepository for test the pattern.
class SomeRepository(
private val someManager: SomeManager
) : ISomeRepository, BaseRepository() {
override val userId: Long?
get() = someManager.userId
override fun testSet(userId: Long) {
someManager.userId = userId
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment