Created
August 15, 2021 10:46
-
-
Save frel/2f486804269e107c4cde185f7ecfafb6 to your computer and use it in GitHub Desktop.
AirBrush Medium article example
This file contains 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 TinyThumbDataFetcher(private val thumb: TinyThumb) : DataFetcher<TinyThumb> { | |
override fun loadData( | |
priority: Priority, | |
callback: DataFetcher.DataCallback<in TinyThumb> | |
) = callback.onDataReady(thumb) | |
override fun getDataClass(): Class<TinyThumb> = TinyThumb::class.java | |
override fun getDataSource(): DataSource = DataSource.LOCAL | |
override fun cleanup() { /* Do nothing */ } | |
override fun cancel() { /* Do nothing */ } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment