diff --git a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/configureroom/ConfigureRoomPresenter.kt b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/configureroom/ConfigureRoomPresenter.kt index 91cc660333..38d6132e14 100644 --- a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/configureroom/ConfigureRoomPresenter.kt +++ b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/configureroom/ConfigureRoomPresenter.kt @@ -76,7 +76,7 @@ class ConfigureRoomPresenter( ) : Presenter { @AssistedFactory interface Factory { - fun create(isSpace: Boolean, parentSpaceId: RoomId?): ConfigureRoomPresenter + fun create(isSpace: Boolean, initialParentSpaceId: RoomId?): ConfigureRoomPresenter } private val cameraPermissionPresenter: PermissionsPresenter = permissionsPresenterFactory.create(android.Manifest.permission.CAMERA) diff --git a/features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/create/CreatePollNode.kt b/features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/create/CreatePollNode.kt index 9e08b58839..6c08549193 100644 --- a/features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/create/CreatePollNode.kt +++ b/features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/create/CreatePollNode.kt @@ -41,7 +41,7 @@ class CreatePollNode( private var isNavigatingUp = AtomicBoolean(false) private val presenter = presenterFactory.create( - backNavigator = { + navigateUp = { if (isNavigatingUp.compareAndSet(false, true)) { navigateUp() } diff --git a/features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/create/CreatePollPresenter.kt b/features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/create/CreatePollPresenter.kt index 6138bab2ae..8e01f1a3e4 100644 --- a/features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/create/CreatePollPresenter.kt +++ b/features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/create/CreatePollPresenter.kt @@ -50,7 +50,7 @@ class CreatePollPresenter( fun interface Factory { fun create( timelineMode: Timeline.Mode, - backNavigator: () -> Unit, + navigateUp: () -> Unit, mode: CreatePollMode ): CreatePollPresenter } diff --git a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/edit/EditDefaultNotificationSettingPresenter.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/edit/EditDefaultNotificationSettingPresenter.kt index df5247188a..178f7033f3 100644 --- a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/edit/EditDefaultNotificationSettingPresenter.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/edit/EditDefaultNotificationSettingPresenter.kt @@ -47,7 +47,7 @@ class EditDefaultNotificationSettingPresenter( ) : Presenter { @AssistedFactory interface Factory { - fun create(oneToOne: Boolean): EditDefaultNotificationSettingPresenter + fun create(isOneToOne: Boolean): EditDefaultNotificationSettingPresenter } private val collator = Collator.getInstance().apply { diff --git a/features/viewfolder/impl/src/main/kotlin/io/element/android/features/viewfolder/impl/file/ViewFilePresenter.kt b/features/viewfolder/impl/src/main/kotlin/io/element/android/features/viewfolder/impl/file/ViewFilePresenter.kt index 615b77e10b..dd294bd53c 100644 --- a/features/viewfolder/impl/src/main/kotlin/io/element/android/features/viewfolder/impl/file/ViewFilePresenter.kt +++ b/features/viewfolder/impl/src/main/kotlin/io/element/android/features/viewfolder/impl/file/ViewFilePresenter.kt @@ -25,8 +25,8 @@ import kotlinx.coroutines.launch @AssistedInject class ViewFilePresenter( - @Assisted("path") val path: String, - @Assisted("name") val name: String, + @Assisted val path: String, + @Assisted val name: String, private val fileContentReader: FileContentReader, private val fileShare: FileShare, private val fileSave: FileSave, @@ -34,8 +34,8 @@ class ViewFilePresenter( @AssistedFactory interface Factory { fun create( - @Assisted("path") path: String, - @Assisted("name") name: String, + path: String, + name: String, ): ViewFilePresenter } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 1ea2c839f7..e182dfa3f2 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -54,7 +54,7 @@ haze = "1.7.2" dependencyAnalysis = "3.5.1" # DI -metro = "0.10.4" +metro = "0.11.0" # Auto service autoservice = "1.1.1" diff --git a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/workmanager/VacuumDatabaseWorker.kt b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/workmanager/VacuumDatabaseWorker.kt index d52edddbb4..a32fbabf9d 100644 --- a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/workmanager/VacuumDatabaseWorker.kt +++ b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/workmanager/VacuumDatabaseWorker.kt @@ -27,11 +27,11 @@ import timber.log.Timber @AssistedInject class VacuumDatabaseWorker( - @Assisted workerParams: WorkerParameters, + @Assisted params: WorkerParameters, @ApplicationContext private val context: Context, private val matrixClientProvider: MatrixClientProvider, private val analyticsService: AnalyticsService, -) : CoroutineWorker(context, workerParams) { +) : CoroutineWorker(context, params) { companion object { const val SESSION_ID_PARAM = "session_id" } diff --git a/libraries/mediaviewer/impl/src/main/kotlin/io/element/android/libraries/mediaviewer/impl/gallery/voice/VoiceMessagePresenter.kt b/libraries/mediaviewer/impl/src/main/kotlin/io/element/android/libraries/mediaviewer/impl/gallery/voice/VoiceMessagePresenter.kt index 4eac5a5ce3..32a9b0f74c 100644 --- a/libraries/mediaviewer/impl/src/main/kotlin/io/element/android/libraries/mediaviewer/impl/gallery/voice/VoiceMessagePresenter.kt +++ b/libraries/mediaviewer/impl/src/main/kotlin/io/element/android/libraries/mediaviewer/impl/gallery/voice/VoiceMessagePresenter.kt @@ -37,7 +37,7 @@ interface VoiceMessagePresenterModule { @AssistedInject class VoiceMessagePresenter( voiceMessagePresenterFactory: VoiceMessagePresenterFactory, - @Assisted private val item: MediaItem.Voice, + @Assisted private val content: MediaItem.Voice, ) : Presenter { @AssistedFactory fun interface Factory : MediaItemPresenterFactory { @@ -45,10 +45,10 @@ class VoiceMessagePresenter( } private val presenter = voiceMessagePresenterFactory.createVoiceMessagePresenter( - eventId = item.eventId, - mediaSource = item.mediaSource, - mimeType = item.mediaInfo.mimeType, - filename = item.mediaInfo.filename, + eventId = content.eventId, + mediaSource = content.mediaSource, + mimeType = content.mediaInfo.mimeType, + filename = content.mediaInfo.filename, // TODO Get the duration for the fallback? duration = Duration.ZERO, ) diff --git a/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/workmanager/FetchNotificationsWorker.kt b/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/workmanager/FetchNotificationsWorker.kt index 25517f9e91..23220cf366 100644 --- a/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/workmanager/FetchNotificationsWorker.kt +++ b/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/workmanager/FetchNotificationsWorker.kt @@ -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() diff --git a/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/workmanager/FetchNotificationWorkerTest.kt b/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/workmanager/FetchNotificationWorkerTest.kt index c1e5d3c92f..99451027a8 100644 --- a/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/workmanager/FetchNotificationWorkerTest.kt +++ b/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/workmanager/FetchNotificationWorkerTest.kt @@ -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, diff --git a/libraries/voiceplayer/impl/src/main/kotlin/io/element/android/libraries/voiceplayer/impl/VoiceMessageMediaRepo.kt b/libraries/voiceplayer/impl/src/main/kotlin/io/element/android/libraries/voiceplayer/impl/VoiceMessageMediaRepo.kt index 310120c9fe..7cc09c4009 100644 --- a/libraries/voiceplayer/impl/src/main/kotlin/io/element/android/libraries/voiceplayer/impl/VoiceMessageMediaRepo.kt +++ b/libraries/voiceplayer/impl/src/main/kotlin/io/element/android/libraries/voiceplayer/impl/VoiceMessageMediaRepo.kt @@ -63,16 +63,16 @@ class DefaultVoiceMessageMediaRepo( mxcTools: MxcTools, private val matrixMediaLoader: MatrixMediaLoader, @Assisted private val mediaSource: MediaSource, - @Assisted("mimeType") private val mimeType: String?, - @Assisted("filename") private val filename: String?, + @Assisted private val mimeType: String?, + @Assisted private val filename: String?, ) : VoiceMessageMediaRepo { @ContributesBinding(RoomScope::class) @AssistedFactory fun interface Factory : VoiceMessageMediaRepo.Factory { override fun create( mediaSource: MediaSource, - @Assisted("mimeType") mimeType: String?, - @Assisted("filename") filename: String?, + @Assisted mimeType: String?, + @Assisted filename: String?, ): DefaultVoiceMessageMediaRepo }