Fix website flavor

This commit is contained in:
andrew 2023-08-07 09:50:51 +09:30
parent 24f7bb2b45
commit d6380c5e63
2 changed files with 17 additions and 3 deletions

View File

@ -1,5 +1,6 @@
package org.thoughtcrime.securesms.notifications
import dagger.Binds
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
@ -8,6 +9,7 @@ import javax.inject.Singleton
@Module
@InstallIn(SingletonComponent::class)
class NoOpPushModule {
}
abstract class NoOpPushModule {
@Binds
abstract fun bindTokenFetcher(tokenFetcher: NoOpTokenFetcher): TokenFetcher
}

View File

@ -0,0 +1,12 @@
package org.thoughtcrime.securesms.notifications
import kotlinx.coroutines.Job
import kotlinx.coroutines.MainScope
import kotlinx.coroutines.launch
import javax.inject.Inject
import javax.inject.Singleton
@Singleton
class NoOpTokenFetcher @Inject constructor() : TokenFetcher {
override fun fetch(): Job = MainScope().launch { }
}