mirror of
https://github.com/element-hq/element-android
synced 2024-11-23 18:05:36 +03:00
Fix lint internal issue: remove object Params
.
GetTurnServerTask.kt: Error: Unexpected failure during lint analysis of GetTurnServerTask.kt (this is a bug in lint or one of the libraries it depends on)
This commit is contained in:
parent
5ad2567633
commit
ff386c3de6
2 changed files with 8 additions and 8 deletions
|
@ -22,16 +22,16 @@ import org.matrix.android.sdk.internal.network.executeRequest
|
|||
import org.matrix.android.sdk.internal.task.Task
|
||||
import javax.inject.Inject
|
||||
|
||||
internal abstract class GetTurnServerTask : Task<GetTurnServerTask.Params, TurnServerResponse> {
|
||||
object Params
|
||||
}
|
||||
internal abstract class GetTurnServerTask : Task<Unit, TurnServerResponse>
|
||||
|
||||
internal class DefaultGetTurnServerTask @Inject constructor(private val voipAPI: VoipApi,
|
||||
private val globalErrorReceiver: GlobalErrorReceiver) : GetTurnServerTask() {
|
||||
internal class DefaultGetTurnServerTask @Inject constructor(
|
||||
private val voipApi: VoipApi,
|
||||
private val globalErrorReceiver: GlobalErrorReceiver
|
||||
) : GetTurnServerTask() {
|
||||
|
||||
override suspend fun execute(params: Params): TurnServerResponse {
|
||||
override suspend fun execute(params: Unit): TurnServerResponse {
|
||||
return executeRequest(globalErrorReceiver) {
|
||||
voipAPI.getTurnServer()
|
||||
voipApi.getTurnServer()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ internal class TurnServerDataSource @Inject constructor(private val turnServerTa
|
|||
}
|
||||
|
||||
suspend fun getTurnServer(): TurnServerResponse {
|
||||
return cachedTurnServerResponse.data ?: turnServerTask.execute(GetTurnServerTask.Params).also {
|
||||
return cachedTurnServerResponse.data ?: turnServerTask.execute(Unit).also {
|
||||
cachedTurnServerResponse.data = it
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue