mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-24 18:36:21 +03:00
Code quality: HashMap / HashSet
This commit is contained in:
parent
ac5b0af63e
commit
d92c090c30
3 changed files with 6 additions and 7 deletions
|
@ -31,7 +31,6 @@ import im.vector.matrix.android.internal.task.TaskThread
|
|||
import im.vector.matrix.android.internal.task.configureWith
|
||||
import im.vector.matrix.android.internal.util.createBackgroundHandler
|
||||
import timber.log.Timber
|
||||
import java.util.*
|
||||
import java.util.concurrent.atomic.AtomicBoolean
|
||||
import javax.inject.Inject
|
||||
|
||||
|
@ -185,9 +184,9 @@ internal class OutgoingRoomKeyRequestManager @Inject constructor(
|
|||
|
||||
Timber.v("## sendOutgoingRoomKeyRequests() : Looking for queued outgoing room key requests")
|
||||
val outgoingRoomKeyRequest = cryptoStore.getOutgoingRoomKeyRequestByState(
|
||||
HashSet<OutgoingRoomKeyRequest.RequestState>(Arrays.asList<OutgoingRoomKeyRequest.RequestState>(OutgoingRoomKeyRequest.RequestState.UNSENT,
|
||||
setOf(OutgoingRoomKeyRequest.RequestState.UNSENT,
|
||||
OutgoingRoomKeyRequest.RequestState.CANCELLATION_PENDING,
|
||||
OutgoingRoomKeyRequest.RequestState.CANCELLATION_PENDING_AND_WILL_RESEND)))
|
||||
OutgoingRoomKeyRequest.RequestState.CANCELLATION_PENDING_AND_WILL_RESEND))
|
||||
|
||||
if (null == outgoingRoomKeyRequest) {
|
||||
Timber.e("## sendOutgoingRoomKeyRequests() : No more outgoing room key requests")
|
||||
|
|
|
@ -30,9 +30,9 @@ internal class DefaultStateService @Inject constructor(private val roomId: Strin
|
|||
override fun updateTopic(topic: String, callback: MatrixCallback<Unit>) {
|
||||
val params = SendStateTask.Params(roomId,
|
||||
EventType.STATE_ROOM_TOPIC,
|
||||
HashMap<String, String>().apply {
|
||||
put("topic", topic)
|
||||
})
|
||||
mapOf(
|
||||
"topic" to topic
|
||||
))
|
||||
|
||||
|
||||
sendStateTask.configureWith(params)
|
||||
|
|
|
@ -50,7 +50,7 @@ succes[^s]
|
|||
### Use int instead of Integer
|
||||
protected Integer
|
||||
|
||||
### Use the interface declaration. Example: use type "Map" instead of type "HashMap" to declare variable or parameter
|
||||
### Use the interface declaration. Example: use type "Map" instead of type "HashMap" to declare variable or parameter. For Kotlin, use mapOf, setOf, ...
|
||||
(private|public|protected| ) (static )?(final )?(HashMap|HashSet|ArrayList)<
|
||||
|
||||
### Use int instead of short
|
||||
|
|
Loading…
Reference in a new issue