Skip to content

Commit 131e631

Browse files
committed
Fix @AssistedInject usages
Now the injected variables in the factories must match the names in the constructors
1 parent 5cac656 commit 131e631

File tree

8 files changed

+10
-10
lines changed

8 files changed

+10
-10
lines changed

features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/configureroom/ConfigureRoomPresenter.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class ConfigureRoomPresenter(
7676
) : Presenter<ConfigureRoomState> {
7777
@AssistedFactory
7878
interface Factory {
79-
fun create(isSpace: Boolean, parentSpaceId: RoomId?): ConfigureRoomPresenter
79+
fun create(isSpace: Boolean, initialParentSpaceId: RoomId?): ConfigureRoomPresenter
8080
}
8181

8282
private val cameraPermissionPresenter: PermissionsPresenter = permissionsPresenterFactory.create(android.Manifest.permission.CAMERA)

features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/create/CreatePollNode.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class CreatePollNode(
4141
private var isNavigatingUp = AtomicBoolean(false)
4242

4343
private val presenter = presenterFactory.create(
44-
backNavigator = {
44+
navigateUp = {
4545
if (isNavigatingUp.compareAndSet(false, true)) {
4646
navigateUp()
4747
}

features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/create/CreatePollPresenter.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class CreatePollPresenter(
5050
fun interface Factory {
5151
fun create(
5252
timelineMode: Timeline.Mode,
53-
backNavigator: () -> Unit,
53+
navigateUp: () -> Unit,
5454
mode: CreatePollMode
5555
): CreatePollPresenter
5656
}

features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/edit/EditDefaultNotificationSettingPresenter.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class EditDefaultNotificationSettingPresenter(
4747
) : Presenter<EditDefaultNotificationSettingState> {
4848
@AssistedFactory
4949
interface Factory {
50-
fun create(oneToOne: Boolean): EditDefaultNotificationSettingPresenter
50+
fun create(isOneToOne: Boolean): EditDefaultNotificationSettingPresenter
5151
}
5252

5353
private val collator = Collator.getInstance().apply {

libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/workmanager/VacuumDatabaseWorker.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ import timber.log.Timber
2727

2828
@AssistedInject
2929
class VacuumDatabaseWorker(
30-
@Assisted workerParams: WorkerParameters,
30+
@Assisted params: WorkerParameters,
3131
@ApplicationContext private val context: Context,
3232
private val matrixClientProvider: MatrixClientProvider,
3333
private val analyticsService: AnalyticsService,
34-
) : CoroutineWorker(context, workerParams) {
34+
) : CoroutineWorker(context, params) {
3535
companion object {
3636
const val SESSION_ID_PARAM = "session_id"
3737
}

libraries/mediaviewer/impl/src/main/kotlin/io/element/android/libraries/mediaviewer/impl/gallery/voice/VoiceMessagePresenter.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class VoiceMessagePresenter(
4141
) : Presenter<VoiceMessageState> {
4242
@AssistedFactory
4343
fun interface Factory : MediaItemPresenterFactory<MediaItem.Voice, VoiceMessageState> {
44-
override fun create(content: MediaItem.Voice): VoiceMessagePresenter
44+
override fun create(item: MediaItem.Voice): VoiceMessagePresenter
4545
}
4646

4747
private val presenter = voiceMessagePresenterFactory.createVoiceMessagePresenter(

libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/workmanager/FetchNotificationsWorker.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ import kotlin.time.Duration.Companion.seconds
4343

4444
@AssistedInject
4545
class FetchNotificationsWorker(
46-
@Assisted workerParams: WorkerParameters,
46+
@Assisted params: WorkerParameters,
4747
@ApplicationContext private val context: Context,
4848
private val networkMonitor: NetworkMonitor,
4949
private val eventResolver: NotifiableEventResolver,
@@ -53,7 +53,7 @@ class FetchNotificationsWorker(
5353
private val workerDataConverter: SyncNotificationsWorkerDataConverter,
5454
private val buildVersionSdkIntProvider: BuildVersionSdkIntProvider,
5555
private val analyticsService: AnalyticsService,
56-
) : CoroutineWorker(context, workerParams) {
56+
) : CoroutineWorker(context, params) {
5757
override suspend fun doWork(): Result {
5858
Timber.d("FetchNotificationsWorker started")
5959
val requests = workerDataConverter.deserialize(inputData) ?: return Result.failure()

libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/workmanager/FetchNotificationWorkerTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ class FetchNotificationWorkerTest {
170170
syncOnNotifiableEvent: SyncOnNotifiableEvent = SyncOnNotifiableEvent {},
171171
analyticsService: FakeAnalyticsService = FakeAnalyticsService(),
172172
) = FetchNotificationsWorker(
173-
workerParams = createWorkerParams(workDataOf("requests" to input)),
173+
params = createWorkerParams(workDataOf("requests" to input)),
174174
context = InstrumentationRegistry.getInstrumentation().context,
175175
networkMonitor = networkMonitor,
176176
eventResolver = eventResolver,

0 commit comments

Comments
 (0)