Update metro to v0.11.0 (#6245)
* Update metro to v0.11.0 * Fix `@AssistedInject` usages Now the injected variables in the factories must match the names in the constructors --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jorge Martín <jorgem@element.io>
This commit is contained in:
@@ -44,7 +44,7 @@ import kotlin.time.Duration.Companion.seconds
|
||||
|
||||
@AssistedInject
|
||||
class FetchNotificationsWorker(
|
||||
@Assisted workerParams: WorkerParameters,
|
||||
@Assisted params: WorkerParameters,
|
||||
@ApplicationContext private val context: Context,
|
||||
private val networkMonitor: NetworkMonitor,
|
||||
private val eventResolver: NotifiableEventResolver,
|
||||
@@ -54,7 +54,7 @@ class FetchNotificationsWorker(
|
||||
private val workerDataConverter: SyncNotificationsWorkerDataConverter,
|
||||
private val buildVersionSdkIntProvider: BuildVersionSdkIntProvider,
|
||||
private val analyticsService: AnalyticsService,
|
||||
) : CoroutineWorker(context, workerParams) {
|
||||
) : CoroutineWorker(context, params) {
|
||||
override suspend fun doWork(): Result {
|
||||
Timber.d("FetchNotificationsWorker started")
|
||||
val requests = workerDataConverter.deserialize(inputData) ?: return Result.failure()
|
||||
|
||||
@@ -170,7 +170,7 @@ class FetchNotificationWorkerTest {
|
||||
syncOnNotifiableEvent: SyncOnNotifiableEvent = SyncOnNotifiableEvent {},
|
||||
analyticsService: FakeAnalyticsService = FakeAnalyticsService(),
|
||||
) = FetchNotificationsWorker(
|
||||
workerParams = createWorkerParams(workDataOf("requests" to input)),
|
||||
params = createWorkerParams(workDataOf("requests" to input)),
|
||||
context = InstrumentationRegistry.getInstrumentation().context,
|
||||
networkMonitor = networkMonitor,
|
||||
eventResolver = eventResolver,
|
||||
|
||||
Reference in New Issue
Block a user