mirror of
https://github.com/element-hq/element-android
synced 2024-11-24 10:25:35 +03:00
Rebase Fixes
This commit is contained in:
parent
5aa698768a
commit
883f70306f
7 changed files with 9 additions and 9 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2021 New Vector Ltd
|
||||
* Copyright 2021 The Matrix.org Foundation C.I.C.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -31,7 +31,7 @@ class PowerLevelsHelper(private val powerLevelsContent: PowerLevelsContent) {
|
|||
* @return the power level
|
||||
*/
|
||||
fun getUserPowerLevelValue(userId: String): Int {
|
||||
return powerLevelsContent.users?.get(userId)
|
||||
return powerLevelsContent.users.get(userId)
|
||||
?: powerLevelsContent.usersDefault
|
||||
}
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ internal fun JsonDict.toSafePowerLevelsContentDict(): JsonDict {
|
|||
eventsDefault = content.eventsDefault,
|
||||
events = content.events,
|
||||
usersDefault = content.usersDefault,
|
||||
users = content.users ?: emptyMap(),
|
||||
users = content.users,
|
||||
stateDefault = content.stateDefault,
|
||||
notifications = content.notifications.mapValues { content.notificationLevel(it.key) }
|
||||
)
|
||||
|
|
|
@ -124,7 +124,7 @@ internal class TokenChunkEventPersistor @Inject constructor(@SessionDatabase pri
|
|||
direction: PaginationDirection): Result {
|
||||
monarchy
|
||||
.awaitTransaction { realm ->
|
||||
Timber.v("Start persisting ${receivedChunk.events?.size} events in $roomId towards $direction")
|
||||
Timber.v("Start persisting ${receivedChunk.events.size} events in $roomId towards $direction")
|
||||
|
||||
val nextToken: String?
|
||||
val prevToken: String?
|
||||
|
@ -189,7 +189,7 @@ internal class TokenChunkEventPersistor @Inject constructor(@SessionDatabase pri
|
|||
receivedChunk: TokenChunkEvent,
|
||||
currentChunk: ChunkEntity
|
||||
) {
|
||||
Timber.v("Add ${receivedChunk.events?.size} events in chunk(${currentChunk.nextToken} | ${currentChunk.prevToken}")
|
||||
Timber.v("Add ${receivedChunk.events.size} events in chunk(${currentChunk.nextToken} | ${currentChunk.prevToken}")
|
||||
val roomMemberContentsByUser = HashMap<String, RoomMemberContent?>()
|
||||
val eventList = receivedChunk.events
|
||||
val stateEvents = receivedChunk.stateEvents
|
||||
|
|
|
@ -94,7 +94,7 @@ internal class DefaultGetUploadsTask @Inject constructor(
|
|||
nextToken = chunk.end ?: "",
|
||||
hasMore = chunk.hasMore()
|
||||
)
|
||||
events = chunk.events ?: emptyList()
|
||||
events = chunk.events
|
||||
}
|
||||
|
||||
var uploadEvents = listOf<UploadEvent>()
|
||||
|
|
|
@ -21,7 +21,7 @@ import android.view.LayoutInflater
|
|||
import android.view.ViewGroup
|
||||
import im.vector.app.core.platform.VectorBaseFragment
|
||||
import im.vector.app.databinding.FragmentRoomDirectoryPickerBinding
|
||||
import kotlinx.android.parcel.Parcelize
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
@Parcelize
|
||||
data class SpaceDirectoryArgs(
|
||||
|
|
|
@ -78,7 +78,7 @@ class SpacePreviewViewModel @AssistedInject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
private fun handleDismissInvite() = withState { state ->
|
||||
private fun handleDismissInvite() {
|
||||
// Here we need to join the space himself as well as the default rooms in that space
|
||||
// TODO modal loading
|
||||
viewModelScope.launch(Dispatchers.IO) {
|
||||
|
@ -108,7 +108,7 @@ class SpacePreviewViewModel @AssistedInject constructor(
|
|||
_viewEvents.post(SpacePreviewViewEvents.JoinSuccess)
|
||||
}
|
||||
is SpaceService.JoinSpaceResult.Fail -> {
|
||||
_viewEvents.post(SpacePreviewViewEvents.JoinFailure(joinResult.error?.toString()))
|
||||
_viewEvents.post(SpacePreviewViewEvents.JoinFailure(joinResult.error.toString()))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue