Let DefaultNotificationDrawerManager use NotificationDisplayer instead of NotificationManagerCompat
This commit is contained in:
parent
f4f623c417
commit
04e5d684d4
17 changed files with 136 additions and 111 deletions
20
libraries/matrixui-test/build.gradle.kts
Normal file
20
libraries/matrixui-test/build.gradle.kts
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* Copyright 2025 New Vector Ltd.
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
||||
* Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
plugins {
|
||||
id("io.element.android-library")
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "io.element.android.libraries.matrix.ui.test"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(projects.libraries.matrix.api)
|
||||
implementation(projects.libraries.matrixui)
|
||||
implementation(libs.coil.compose)
|
||||
}
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
* Copyright 2025 New Vector Ltd.
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
||||
* Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
package io.element.android.libraries.matrix.ui.test.media
|
||||
|
||||
import coil3.ComponentRegistry
|
||||
import coil3.ImageLoader
|
||||
import coil3.disk.DiskCache
|
||||
import coil3.memory.MemoryCache
|
||||
import coil3.request.Disposable
|
||||
import coil3.request.ImageRequest
|
||||
import coil3.request.ImageResult
|
||||
|
||||
class FakeImageLoader : ImageLoader {
|
||||
private val executedRequests = mutableListOf<ImageRequest>()
|
||||
|
||||
override val defaults: ImageRequest.Defaults
|
||||
get() = error("Not implemented")
|
||||
override val components: ComponentRegistry
|
||||
get() = error("Not implemented")
|
||||
override val memoryCache: MemoryCache?
|
||||
get() = error("Not implemented")
|
||||
override val diskCache: DiskCache?
|
||||
get() = error("Not implemented")
|
||||
|
||||
override fun enqueue(request: ImageRequest): Disposable {
|
||||
error("Not implemented")
|
||||
}
|
||||
|
||||
override suspend fun execute(request: ImageRequest): ImageResult {
|
||||
executedRequests.add(request)
|
||||
error("Not implemented")
|
||||
}
|
||||
|
||||
override fun shutdown() {
|
||||
error("Not implemented")
|
||||
}
|
||||
|
||||
override fun newBuilder(): ImageLoader.Builder {
|
||||
error("Not implemented")
|
||||
}
|
||||
|
||||
fun getExecutedRequestsData(): List<Any> {
|
||||
return executedRequests.map { it.data }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Copyright 2025 New Vector Ltd.
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
||||
* Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
package io.element.android.libraries.matrix.ui.test.media
|
||||
|
||||
import coil3.ImageLoader
|
||||
import io.element.android.libraries.matrix.api.MatrixClient
|
||||
import io.element.android.libraries.matrix.api.core.SessionId
|
||||
import io.element.android.libraries.matrix.ui.media.ImageLoaderHolder
|
||||
|
||||
class FakeImageLoaderHolder(
|
||||
val fakeImageLoader: ImageLoader = FakeImageLoader(),
|
||||
) : ImageLoaderHolder {
|
||||
override fun get(client: MatrixClient): ImageLoader {
|
||||
return fakeImageLoader
|
||||
}
|
||||
|
||||
override fun remove(sessionId: SessionId) {
|
||||
// No-op
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue