Emoji data source as singleton

This commit is contained in:
ganfra 2020-01-08 11:54:42 +01:00
parent 03c3c9ae57
commit 2dd2a8db6c
2 changed files with 5 additions and 1 deletions

View file

@ -44,6 +44,7 @@ import im.vector.riotx.features.notifications.*
import im.vector.riotx.features.rageshake.BugReporter
import im.vector.riotx.features.rageshake.VectorFileLogger
import im.vector.riotx.features.rageshake.VectorUncaughtExceptionHandler
import im.vector.riotx.features.reactions.data.EmojiDataSource
import im.vector.riotx.features.session.SessionListener
import im.vector.riotx.features.settings.VectorPreferences
import im.vector.riotx.features.share.ShareRoomListDataSource
@ -124,6 +125,8 @@ interface VectorComponent {
fun uiStateRepository(): UiStateRepository
fun emojiDataSource(): EmojiDataSource
@Component.Factory
interface Factory {
fun create(@BindsInstance context: Context): VectorComponent

View file

@ -20,8 +20,9 @@ import com.squareup.moshi.Moshi
import im.vector.riotx.R
import im.vector.riotx.core.di.ScreenScope
import javax.inject.Inject
import javax.inject.Singleton
@ScreenScope
@Singleton
class EmojiDataSource @Inject constructor(
resources: Resources
) {