mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-16 12:00:03 +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.task.configureWith
|
||||||
import im.vector.matrix.android.internal.util.createBackgroundHandler
|
import im.vector.matrix.android.internal.util.createBackgroundHandler
|
||||||
import timber.log.Timber
|
import timber.log.Timber
|
||||||
import java.util.*
|
|
||||||
import java.util.concurrent.atomic.AtomicBoolean
|
import java.util.concurrent.atomic.AtomicBoolean
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
|
@ -185,9 +184,9 @@ internal class OutgoingRoomKeyRequestManager @Inject constructor(
|
||||||
|
|
||||||
Timber.v("## sendOutgoingRoomKeyRequests() : Looking for queued outgoing room key requests")
|
Timber.v("## sendOutgoingRoomKeyRequests() : Looking for queued outgoing room key requests")
|
||||||
val outgoingRoomKeyRequest = cryptoStore.getOutgoingRoomKeyRequestByState(
|
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,
|
||||||
OutgoingRoomKeyRequest.RequestState.CANCELLATION_PENDING_AND_WILL_RESEND)))
|
OutgoingRoomKeyRequest.RequestState.CANCELLATION_PENDING_AND_WILL_RESEND))
|
||||||
|
|
||||||
if (null == outgoingRoomKeyRequest) {
|
if (null == outgoingRoomKeyRequest) {
|
||||||
Timber.e("## sendOutgoingRoomKeyRequests() : No more outgoing room key requests")
|
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>) {
|
override fun updateTopic(topic: String, callback: MatrixCallback<Unit>) {
|
||||||
val params = SendStateTask.Params(roomId,
|
val params = SendStateTask.Params(roomId,
|
||||||
EventType.STATE_ROOM_TOPIC,
|
EventType.STATE_ROOM_TOPIC,
|
||||||
HashMap<String, String>().apply {
|
mapOf(
|
||||||
put("topic", topic)
|
"topic" to topic
|
||||||
})
|
))
|
||||||
|
|
||||||
|
|
||||||
sendStateTask.configureWith(params)
|
sendStateTask.configureWith(params)
|
||||||
|
|
|
@ -50,7 +50,7 @@ succes[^s]
|
||||||
### Use int instead of Integer
|
### Use int instead of Integer
|
||||||
protected 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)<
|
(private|public|protected| ) (static )?(final )?(HashMap|HashSet|ArrayList)<
|
||||||
|
|
||||||
### Use int instead of short
|
### Use int instead of short
|
||||||
|
|
Loading…
Add table
Reference in a new issue