aboutsummaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/java/dev/msfjarvis/aps/injection/coroutines/DispatcherModule.kt19
-rw-r--r--app/src/main/java/dev/msfjarvis/aps/injection/totp/TotpModule.kt2
2 files changed, 20 insertions, 1 deletions
diff --git a/app/src/main/java/dev/msfjarvis/aps/injection/coroutines/DispatcherModule.kt b/app/src/main/java/dev/msfjarvis/aps/injection/coroutines/DispatcherModule.kt
new file mode 100644
index 00000000..bf84fc27
--- /dev/null
+++ b/app/src/main/java/dev/msfjarvis/aps/injection/coroutines/DispatcherModule.kt
@@ -0,0 +1,19 @@
+/*
+ * Copyright © 2014-2021 The Android Password Store Authors. All Rights Reserved.
+ * SPDX-License-Identifier: GPL-3.0-only
+ */
+
+package dev.msfjarvis.aps.injection.coroutines
+
+import dagger.Binds
+import dagger.Module
+import dagger.hilt.InstallIn
+import dagger.hilt.components.SingletonComponent
+import dev.msfjarvis.aps.util.coroutines.DefaultDispatcherProvider
+import dev.msfjarvis.aps.util.coroutines.DispatcherProvider
+
+@Module
+@InstallIn(SingletonComponent::class)
+interface DispatcherModule {
+ @Binds fun DefaultDispatcherProvider.bind(): DispatcherProvider
+}
diff --git a/app/src/main/java/dev/msfjarvis/aps/injection/totp/TotpModule.kt b/app/src/main/java/dev/msfjarvis/aps/injection/totp/TotpModule.kt
index e02a3b86..859559cd 100644
--- a/app/src/main/java/dev/msfjarvis/aps/injection/totp/TotpModule.kt
+++ b/app/src/main/java/dev/msfjarvis/aps/injection/totp/TotpModule.kt
@@ -15,5 +15,5 @@ import dev.msfjarvis.aps.util.totp.UriTotpFinder
@Module
@InstallIn(ActivityComponent::class)
interface TotpModule {
- @Binds abstract fun bindTotpFinder(totpFinder: UriTotpFinder): TotpFinder
+ @Binds fun UriTotpFinder.bind(): TotpFinder
}