Skip to content

Commit

Permalink
Make DateTimeObserver a singleton
Browse files Browse the repository at this point in the history
  • Loading branch information
jmartinesp committed Oct 15, 2024
1 parent b1e820c commit fdf4771
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import com.squareup.anvil.annotations.ContributesBinding
import io.element.android.libraries.androidutils.system.DateTimeObserver.Event
import io.element.android.libraries.di.AppScope
import io.element.android.libraries.di.ApplicationContext
import io.element.android.libraries.di.SingleIn
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.MutableSharedFlow
import java.time.Instant
Expand All @@ -30,6 +31,7 @@ interface DateTimeObserver {
}

@ContributesBinding(AppScope::class)
@SingleIn(AppScope::class)
class DefaultDateTimeObserver @Inject constructor(
@ApplicationContext context: Context
) : DateTimeObserver {
Expand Down

0 comments on commit fdf4771

Please sign in to comment.