Compare commits

..

1 Commits

Author SHA1 Message Date
Valere
982331e47c Add unread indent on room list 2019-08-28 16:31:29 +02:00
109 changed files with 613 additions and 3060 deletions

View File

@ -1,26 +1,3 @@
Changes in RiotX 0.5.0 (2019-XX-XX)
===================================================

Features:
-

Improvements:
- Reduce default release build log level, and lab option to enable more logs.

Other changes:
-

Bugfix:
- Fix crash due to missing informationData (#535)
- Progress in initial sync dialog is decreasing for a step and should not (#532)

Translations:
-

Build:
- Fix issue with version name (#533)
- Fix rendering issue of accepted third party invitation event

Changes in RiotX 0.4.0 (2019-XX-XX)
===================================================

@ -30,14 +7,21 @@ Features:
Improvements:
- Reactions: Reinstate the ability to react with non-unicode keys (#307)

Other changes:
-

Bugfix:
- Fix text diff linebreak display (#441)
- Date change message repeats for each redaction until a normal message (#358)
- Slide-in reply icon is distorted (#423)
- Regression / e2e replies not encrypted
- Some video won't play
- Privacy: remove log of notifiable event (#519)
- Fix crash with EmojiCompat (#530)

Translations:
-

Build:
-

Changes in RiotX 0.3.0 (2019-08-08)
===================================================

View File

@ -21,7 +21,7 @@ import im.vector.matrix.android.internal.crypto.store.IMXCryptoStore
import im.vector.matrix.android.internal.crypto.store.db.RealmCryptoStore
import im.vector.matrix.android.internal.crypto.store.db.RealmCryptoStoreModule
import io.realm.RealmConfiguration
import kotlin.random.Random
import java.util.*

internal class CryptoStoreHelper {

@ -35,7 +35,7 @@ internal class CryptoStoreHelper {
}

fun createCredential() = Credentials(
userId = "userId_" + Random.nextInt(),
userId = "userId_" + Random().nextInt(),
homeServer = "http://matrix.org",
accessToken = "access_token",
refreshToken = null,

View File

@ -17,6 +17,7 @@
package im.vector.matrix.android.api.comparators

import im.vector.matrix.android.api.interfaces.DatedObject
import java.util.*

object DatedObjectComparators {


View File

@ -19,7 +19,7 @@ package im.vector.matrix.android.api.extensions
import im.vector.matrix.android.api.comparators.DatedObjectComparators
import im.vector.matrix.android.internal.crypto.model.MXDeviceInfo
import im.vector.matrix.android.internal.crypto.model.rest.DeviceInfo
import java.util.Collections
import java.util.*

/* ==========================================================================================
* MXDeviceInfo

View File

@ -18,17 +18,18 @@ package im.vector.matrix.android.api.pushrules
import im.vector.matrix.android.api.session.events.model.Event
import im.vector.matrix.android.api.session.room.RoomService
import timber.log.Timber
import java.util.regex.Pattern

private val regex = Regex("^(==|<=|>=|<|>)?(\\d*)$")
private val regex = Pattern.compile("^(==|<=|>=|<|>)?(\\d*)$")

class RoomMemberCountCondition(val iz: String) : Condition(Kind.room_member_count) {
class RoomMemberCountCondition(val `is`: String) : Condition(Kind.room_member_count) {

override fun isSatisfied(conditionResolver: ConditionResolver): Boolean {
return conditionResolver.resolveRoomMemberCountCondition(this)
}

override fun technicalDescription(): String {
return "Room member count is $iz"
return "Room member count is $`is`"
}

fun isSatisfied(event: Event, session: RoomService?): Boolean {
@ -55,9 +56,12 @@ class RoomMemberCountCondition(val iz: String) : Condition(Kind.room_member_coun
*/
private fun parseIsField(): Pair<String?, Int>? {
try {
val match = regex.find(iz) ?: return null
val (prefix, count) = match.destructured
return prefix to count.toInt()
val match = regex.matcher(`is`)
if (match.find()) {
val prefix = match.group(1)
val count = match.group(2).toInt()
return prefix to count
}
} catch (t: Throwable) {
Timber.d(t)
}

View File

@ -20,10 +20,10 @@ import androidx.lifecycle.LiveData

interface InitialSyncProgressService {

fun getInitialSyncProgressStatus() : LiveData<Status?>
fun getLiveStatus() : LiveData<Status?>

data class Status(
@StringRes val statusText: Int,
@StringRes val statusText: Int?,
val percentProgress: Int = 0
)
}

View File

@ -17,7 +17,7 @@ package im.vector.matrix.android.api.session.pushers

import androidx.lifecycle.LiveData
import im.vector.matrix.android.api.MatrixCallback
import java.util.UUID
import java.util.*


interface PushersService {

View File

@ -29,10 +29,11 @@ data class RoomSummary(
val topic: String = "",
val avatarUrl: String = "",
val isDirect: Boolean = false,
val latestEvent: TimelineEvent? = null,
val latestPreviewableEvent: TimelineEvent? = null,
val otherMemberIds: List<String> = emptyList(),
val notificationCount: Int = 0,
val highlightCount: Int = 0,
val hasUnreadMessages: Boolean = false,
val tags: List<RoomTag> = emptyList(),
val membership: Membership = Membership.NONE,
val versioningState: VersioningState = VersioningState.NONE

View File

@ -29,6 +29,7 @@ import im.vector.matrix.android.api.session.room.model.PowerLevels
import im.vector.matrix.android.api.session.room.model.RoomDirectoryVisibility
import im.vector.matrix.android.api.session.room.model.RoomHistoryVisibility
import im.vector.matrix.android.internal.auth.data.ThreePidMedium
import java.util.*

/**
* Parameter to create a room, with facilities functions to configure it
@ -132,7 +133,7 @@ class CreateRoomParams {
)

if (null == initialStates) {
initialStates = mutableListOf(algoEvent)
initialStates = Arrays.asList<Event>(algoEvent)
} else {
initialStates!!.add(algoEvent)
}
@ -165,7 +166,7 @@ class CreateRoomParams {
content = contentMap.toContent())

if (null == initialStates) {
initialStates = mutableListOf(historyVisibilityEvent)
initialStates = Arrays.asList<Event>(historyVisibilityEvent)
} else {
initialStates!!.add(historyVisibilityEvent)
}

View File

@ -27,7 +27,7 @@ import java.math.BigInteger
import java.security.KeyPairGenerator
import java.security.KeyStore
import java.security.SecureRandom
import java.util.Calendar
import java.util.*
import javax.crypto.*
import javax.crypto.spec.GCMParameterSpec
import javax.crypto.spec.IvParameterSpec
@ -479,7 +479,12 @@ object SecretStoringUtils {
val output = Cipher.getInstance(RSA_MODE)
output.init(Cipher.DECRYPT_MODE, privateKeyEntry.privateKey)

return CipherInputStream(encrypted, output).use { it.readBytes() }
val bos = ByteArrayOutputStream()
CipherInputStream(encrypted, output).use {
it.copyTo(bos)
}

return bos.toByteArray()
}

private fun formatMExtract(bis: InputStream): Pair<ByteArray, ByteArray> {
@ -490,7 +495,14 @@ object SecretStoringUtils {
val iv = ByteArray(ivSize)
bis.read(iv, 0, ivSize)

val encrypted = bis.readBytes()

val bos = ByteArrayOutputStream()
var next = bis.read()
while (next != -1) {
bos.write(next)
next = bis.read()
}
val encrypted = bos.toByteArray()
return Pair(iv, encrypted)
}

@ -518,7 +530,14 @@ object SecretStoringUtils {
val iv = ByteArray(ivSize)
bis.read(iv)

val encrypted = bis.readBytes()
val bos = ByteArrayOutputStream()

var next = bis.read()
while (next != -1) {
bos.write(next)
next = bis.read()
}
val encrypted = bos.toByteArray()
return Triple(encryptedKey, iv, encrypted)
}

@ -560,7 +579,14 @@ object SecretStoringUtils {
val iv = ByteArray(ivSize)
bis.read(iv)

val encrypted = bis.readBytes()
val bos = ByteArrayOutputStream()

var next = bis.read()
while (next != -1) {
bos.write(next)
next = bis.read()
}
val encrypted = bos.toByteArray()
return Triple(salt, iv, encrypted)
}
}

View File

@ -93,7 +93,7 @@ import kotlin.math.max
* Specially, it tracks all room membership changes events in order to do keys updates.
*/
@SessionScope
internal class DefaultCryptoService @Inject constructor(
internal class CryptoManager @Inject constructor(
// Olm Manager
private val olmManager: OlmManager,
// The credentials,
@ -1067,6 +1067,6 @@ internal class DefaultCryptoService @Inject constructor(
* ========================================================================================== */

override fun toString(): String {
return "DefaultCryptoService of " + credentials.userId + " (" + credentials.deviceId + ")"
return "CryptoManager of " + credentials.userId + " (" + credentials.deviceId + ")"
}
}

View File

@ -105,7 +105,7 @@ internal abstract class CryptoModule {
}

@Binds
abstract fun bindCryptoService(cryptoService: DefaultCryptoService): CryptoService
abstract fun bindCryptoService(cryptoManager: CryptoManager): CryptoService

@Binds
abstract fun bindDeleteDeviceTask(deleteDeviceTask: DefaultDeleteDeviceTask): DeleteDeviceTask

View File

@ -17,6 +17,7 @@
package im.vector.matrix.android.internal.crypto

import im.vector.matrix.android.api.auth.data.Credentials
import java.util.*
import javax.inject.Inject

internal class ObjectSigner @Inject constructor(private val credentials: Credentials,

View File

@ -31,6 +31,7 @@ import im.vector.matrix.android.internal.crypto.model.event.OlmPayloadContent
import im.vector.matrix.android.internal.di.MoshiProvider
import im.vector.matrix.android.internal.util.convertFromUTF8
import timber.log.Timber
import java.util.*

internal class MXOlmDecryption(
// The olm device interface
@ -157,14 +158,33 @@ internal class MXOlmDecryption(
* @return payload, if decrypted successfully.
*/
private fun decryptMessage(message: JsonDict, theirDeviceIdentityKey: String): String? {
val sessionIds = olmDevice.getSessionIds(theirDeviceIdentityKey) ?: emptySet()
val sessionIdsSet = olmDevice.getSessionIds(theirDeviceIdentityKey)

val messageBody = message["body"] as? String ?: return null
val messageType = when (val typeAsVoid = message["type"]) {
is Double -> typeAsVoid.toInt()
is Int -> typeAsVoid
is Long -> typeAsVoid.toInt()
else -> return null
val sessionIds: List<String>

if (null == sessionIdsSet) {
sessionIds = ArrayList()
} else {
sessionIds = ArrayList(sessionIdsSet)
}

val messageBody = message["body"] as? String
var messageType: Int? = null

val typeAsVoid = message["type"]

if (null != typeAsVoid) {
if (typeAsVoid is Double) {
messageType = typeAsVoid.toInt()
} else if (typeAsVoid is Int) {
messageType = typeAsVoid
} else if (typeAsVoid is Long) {
messageType = typeAsVoid.toInt()
}
}

if (null == messageBody || null == messageType) {
return null
}

// Try each session in turn

View File

@ -26,6 +26,7 @@ import java.io.ByteArrayOutputStream
import java.io.InputStream
import java.security.MessageDigest
import java.security.SecureRandom
import java.util.*
import javax.crypto.Cipher
import javax.crypto.spec.IvParameterSpec
import javax.crypto.spec.SecretKeySpec
@ -58,7 +59,8 @@ object MXEncryptedAttachments {
// Half of the IV is random, the lower order bits are zeroed
// such that the counter never wraps.
// See https://github.com/matrix-org/matrix-ios-kit/blob/3dc0d8e46b4deb6669ed44f72ad79be56471354c/MatrixKit/Models/Room/MXEncryptedAttachments.m#L75
val initVectorBytes = ByteArray(16) { 0.toByte() }
val initVectorBytes = ByteArray(16)
Arrays.fill(initVectorBytes, 0.toByte())

val ivRandomPart = ByteArray(8)
secureRandom.nextBytes(ivRandomPart)
@ -113,7 +115,7 @@ object MXEncryptedAttachments {
encryptedByteArray = outStream.toByteArray()
)

Timber.v("Encrypt in ${System.currentTimeMillis() - t0} ms")
Timber.v("Encrypt in " + (System.currentTimeMillis() - t0) + " ms")
return Try.just(result)
} catch (oom: OutOfMemoryError) {
Timber.e(oom, "## encryptAttachment failed")
@ -204,13 +206,13 @@ object MXEncryptedAttachments {
val decryptedStream = ByteArrayInputStream(outStream.toByteArray())
outStream.close()

Timber.v("Decrypt in ${System.currentTimeMillis() - t0} ms")
Timber.v("Decrypt in " + (System.currentTimeMillis() - t0) + " ms")

return decryptedStream
} catch (oom: OutOfMemoryError) {
Timber.e(oom, "## decryptAttachment() : failed ${oom.message}")
Timber.e(oom, "## decryptAttachment() : failed " + oom.message)
} catch (e: Exception) {
Timber.e(e, "## decryptAttachment() : failed ${e.message}")
Timber.e(e, "## decryptAttachment() : failed " + e.message)
}

try {
@ -226,20 +228,34 @@ object MXEncryptedAttachments {
* Base64 URL conversion methods
*/

private fun base64UrlToBase64(base64Url: String): String {
return base64Url.replace('-', '+')
.replace('_', '/')
private fun base64UrlToBase64(base64Url: String?): String? {
var result = base64Url
if (null != result) {
result = result.replace("-".toRegex(), "+")
result = result.replace("_".toRegex(), "/")
}

private fun base64ToBase64Url(base64: String): String {
return base64.replace("\n".toRegex(), "")
.replace("\\+".toRegex(), "-")
.replace('/', '_')
.replace("=", "")
return result
}

private fun base64ToUnpaddedBase64(base64: String): String {
return base64.replace("\n".toRegex(), "")
.replace("=", "")
private fun base64ToBase64Url(base64: String?): String? {
var result = base64
if (null != result) {
result = result.replace("\n".toRegex(), "")
result = result.replace("\\+".toRegex(), "-")
result = result.replace("/".toRegex(), "_")
result = result.replace("=".toRegex(), "")
}
return result
}

private fun base64ToUnpaddedBase64(base64: String?): String? {
var result = base64
if (null != result) {
result = result.replace("\n".toRegex(), "")
result = result.replace("=".toRegex(), "")
}

return result
}
}

View File

@ -66,8 +66,9 @@ import org.matrix.olm.OlmPkEncryption
import org.matrix.olm.OlmPkMessage
import timber.log.Timber
import java.security.InvalidParameterException
import java.util.*
import javax.inject.Inject
import kotlin.random.Random
import kotlin.collections.HashMap

/**
* A KeysBackup class instance manage incremental backup of e2e keys (megolm keys)
@ -113,6 +114,8 @@ internal class KeysBackup @Inject constructor(
// The backup key being used.
private var backupOlmPkEncryption: OlmPkEncryption? = null

private val random = Random()

private var backupAllGroupSessionsCallback: MatrixCallback<Unit>? = null

private var keysBackupStateListener: KeysBackupStateListener? = null
@ -845,7 +848,7 @@ internal class KeysBackup @Inject constructor(
// Wait between 0 and 10 seconds, to avoid backup requests from
// different clients hitting the server all at the same time when a
// new key is sent
val delayInMs = Random.nextLong(KEY_BACKUP_WAITING_TIME_TO_SEND_KEY_BACKUP_MILLIS)
val delayInMs = random.nextInt(KEY_BACKUP_WAITING_TIME_TO_SEND_KEY_BACKUP_MILLIS).toLong()

uiHandler.postDelayed({ backupKeys() }, delayInMs)
}
@ -1304,7 +1307,7 @@ internal class KeysBackup @Inject constructor(

// Make the request
storeSessionDataTask
.configureWith(StoreSessionsDataTask.Params(keysBackupVersion!!.version!!, keysBackupData)) {
.configureWith(StoreSessionsDataTask.Params(keysBackupVersion!!.version!!, keysBackupData)){
this.callback = sendingRequestCallback
}
.executeBy(taskExecutor)
@ -1402,7 +1405,7 @@ internal class KeysBackup @Inject constructor(

companion object {
// Maximum delay in ms in {@link maybeBackupKeys}
private const val KEY_BACKUP_WAITING_TIME_TO_SEND_KEY_BACKUP_MILLIS = 10_000L
private const val KEY_BACKUP_WAITING_TIME_TO_SEND_KEY_BACKUP_MILLIS = 10000

// Maximum number of keys to send at a time to the homeserver.
private const val KEY_BACKUP_SEND_KEYS_MAX_COUNT = 100

View File

@ -22,7 +22,7 @@ package im.vector.matrix.android.internal.crypto.keysbackup
import androidx.annotation.WorkerThread
import im.vector.matrix.android.api.listeners.ProgressListener
import timber.log.Timber
import java.util.UUID
import java.util.*
import javax.crypto.Mac
import javax.crypto.spec.SecretKeySpec
import kotlin.experimental.xor

View File

@ -20,6 +20,7 @@ import android.os.Handler
import im.vector.matrix.android.api.session.crypto.keysbackup.KeysBackupState
import im.vector.matrix.android.api.session.crypto.keysbackup.KeysBackupStateListener
import timber.log.Timber
import java.util.*

internal class KeysBackupStateManager(private val uiHandler: Handler) {


View File

@ -23,6 +23,7 @@ import com.squareup.moshi.JsonClass
import im.vector.matrix.android.api.util.JsonDict
import im.vector.matrix.android.internal.crypto.model.rest.DeviceKeys
import java.io.Serializable
import java.util.*

@JsonClass(generateAdapter = true)
data class MXDeviceInfo(

View File

@ -18,6 +18,7 @@ package im.vector.matrix.android.internal.crypto.model

import im.vector.matrix.android.api.util.JsonDict
import timber.log.Timber
import java.util.*

data class MXKey(
/**
@ -45,7 +46,11 @@ data class MXKey(
* @return the signed data map
*/
fun signalableJSONDictionary(): Map<String, Any> {
return mapOf("key" to value)
val map = HashMap<String, Any>()

map["key"] = value

return map
}

/**

View File

@ -16,6 +16,7 @@

package im.vector.matrix.android.internal.crypto.model

import java.util.*

class MXUsersDevicesMap<E> {

@ -26,7 +27,7 @@ class MXUsersDevicesMap<E> {
* @return the user Ids
*/
val userIds: List<String>
get() = map.keys.toList()
get() = ArrayList(map.keys)

val isEmpty: Boolean
get() = map.isEmpty()
@ -39,7 +40,7 @@ class MXUsersDevicesMap<E> {
* @return the device ids list
*/
fun getUserDeviceIds(userId: String?): List<String>? {
return if (!userId.isNullOrBlank() && map.containsKey(userId)) {
return if (userId?.isNotBlank() == true && map.containsKey(userId)) {
map[userId]!!.keys.toList()
} else null
}
@ -52,7 +53,7 @@ class MXUsersDevicesMap<E> {
* @return the object
*/
fun getObject(userId: String?, deviceId: String?): E? {
return if (!userId.isNullOrBlank() && !deviceId.isNullOrBlank()) {
return if (userId?.isNotBlank() == true && deviceId?.isNotBlank() == true && map.containsKey(userId)) {
map[userId]?.get(deviceId)
} else null
}
@ -66,8 +67,11 @@ class MXUsersDevicesMap<E> {
*/
fun setObject(userId: String?, deviceId: String?, o: E?) {
if (null != o && userId?.isNotBlank() == true && deviceId?.isNotBlank() == true) {
val devices = map.getOrPut(userId) { HashMap() }
devices[deviceId] = o
if (map[userId] == null) {
map[userId] = HashMap()
}

map[userId]?.put(deviceId, o)
}
}

@ -78,7 +82,7 @@ class MXUsersDevicesMap<E> {
* @param userId the user id
*/
fun setObjects(userId: String?, objectsPerDevices: Map<String, E>?) {
if (!userId.isNullOrBlank()) {
if (userId?.isNotBlank() == true) {
if (null == objectsPerDevices) {
map.remove(userId)
} else {
@ -93,7 +97,7 @@ class MXUsersDevicesMap<E> {
* @param userId the user id.
*/
fun removeUserObjects(userId: String?) {
if (!userId.isNullOrBlank()) {
if (userId?.isNotBlank() == true) {
map.remove(userId)
}
}

View File

@ -21,8 +21,8 @@ import im.vector.matrix.android.internal.crypto.model.MXUsersDevicesMap
import im.vector.matrix.android.internal.crypto.model.rest.SendToDeviceBody
import im.vector.matrix.android.internal.network.executeRequest
import im.vector.matrix.android.internal.task.Task
import java.util.*
import javax.inject.Inject
import kotlin.random.Random

internal interface SendToDeviceTask : Task<SendToDeviceTask.Params, Unit> {
data class Params(
@ -45,7 +45,7 @@ internal class DefaultSendToDeviceTask @Inject constructor(private val cryptoApi
return executeRequest {
apiCall = cryptoApi.sendToDevice(
params.eventType,
params.transactionId ?: Random.nextInt(Integer.MAX_VALUE).toString(),
params.transactionId ?: Random().nextInt(Integer.MAX_VALUE).toString(),
sendToDeviceBody
)
}

View File

@ -44,7 +44,7 @@ import im.vector.matrix.android.internal.util.MatrixCoroutineDispatchers
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch
import timber.log.Timber
import java.util.UUID
import java.util.*
import javax.inject.Inject
import kotlin.collections.HashMap

@ -161,7 +161,7 @@ internal class DefaultSasVerificationService @Inject constructor(private val cre
cancelTransaction(
startReq.transactionID!!,
otherUserId!!,
startReq.fromDevice ?: event.getSenderKey()!!,
startReq?.fromDevice ?: event.getSenderKey()!!,
CancelCode.UnknownMethod
)
}
@ -388,13 +388,14 @@ internal class DefaultSasVerificationService @Inject constructor(private val cre
* This string must be unique for the pair of users performing verification for the duration that the transaction is valid
*/
private fun createUniqueIDForTransaction(userId: String, deviceID: String): String {
return buildString {
append(credentials.userId).append("|")
append(credentials.deviceId).append("|")
append(userId).append("|")
append(deviceID).append("|")
append(UUID.randomUUID().toString())
}
val buff = StringBuffer()
buff
.append(credentials.userId).append("|")
.append(credentials.deviceId).append("|")
.append(userId).append("|")
.append(deviceID).append("|")
.append(UUID.randomUUID().toString())
return buff.toString()
}



View File

@ -20,9 +20,10 @@ import im.vector.matrix.android.api.session.crypto.CryptoService
import im.vector.matrix.android.api.session.crypto.MXCryptoError
import im.vector.matrix.android.api.session.room.model.RoomSummary
import im.vector.matrix.android.api.session.room.model.tag.RoomTag
import im.vector.matrix.android.api.session.room.read.ReadService
import im.vector.matrix.android.internal.crypto.algorithms.olm.OlmDecryptionResult
import im.vector.matrix.android.internal.database.model.RoomSummaryEntity
import java.util.UUID
import java.util.*
import javax.inject.Inject

internal class RoomSummaryMapper @Inject constructor(
@ -30,12 +31,12 @@ internal class RoomSummaryMapper @Inject constructor(
val timelineEventMapper: TimelineEventMapper
) {

fun map(roomSummaryEntity: RoomSummaryEntity): RoomSummary {
fun map(roomSummaryEntity: RoomSummaryEntity, readService: ReadService?): RoomSummary {
val tags = roomSummaryEntity.tags.map {
RoomTag(it.tagName, it.tagOrder)
}

val latestEvent = roomSummaryEntity.latestEvent?.let {
val latestEvent = roomSummaryEntity.latestPreviewableEvent?.let {
timelineEventMapper.map(it)
}
if (latestEvent?.root?.isEncrypted() == true && latestEvent.root.mxDecryptionResult == null) {
@ -53,16 +54,20 @@ internal class RoomSummaryMapper @Inject constructor(

}
}
val hasUnreadMessages = roomSummaryEntity.notificationCount > 0
//avoid this call if we are sure there are unread events
|| latestEvent?.root?.eventId?.let { readService?.isEventRead(it)?.not() } ?: false
return RoomSummary(
roomId = roomSummaryEntity.roomId,
displayName = roomSummaryEntity.displayName ?: "",
topic = roomSummaryEntity.topic ?: "",
avatarUrl = roomSummaryEntity.avatarUrl ?: "",
isDirect = roomSummaryEntity.isDirect,
latestEvent = latestEvent,
latestPreviewableEvent = latestEvent,
otherMemberIds = roomSummaryEntity.otherMemberIds.toList(),
highlightCount = roomSummaryEntity.highlightCount,
notificationCount = roomSummaryEntity.notificationCount,
hasUnreadMessages = hasUnreadMessages,
tags = tags,
membership = roomSummaryEntity.membership,
versioningState = roomSummaryEntity.versioningState

View File

@ -26,7 +26,7 @@ internal open class RoomSummaryEntity(@PrimaryKey var roomId: String = "",
var displayName: String? = "",
var avatarUrl: String? = "",
var topic: String? = "",
var latestEvent: TimelineEventEntity? = null,
var latestPreviewableEvent: TimelineEventEntity? = null,
var heroes: RealmList<String> = RealmList(),
var joinedMembersCount: Int? = 0,
var invitedMembersCount: Int? = 0,

View File

@ -24,6 +24,7 @@ import java.security.KeyStore
import java.security.MessageDigest
import java.security.cert.CertificateException
import java.security.cert.X509Certificate
import java.util.*
import javax.net.ssl.*
import kotlin.experimental.and


View File

@ -25,6 +25,7 @@ import java.net.UnknownHostException
import java.security.KeyManagementException
import java.security.NoSuchAlgorithmException
import java.security.SecureRandom
import java.util.*
import javax.net.ssl.SSLContext
import javax.net.ssl.SSLSocket
import javax.net.ssl.SSLSocketFactory
@ -100,16 +101,25 @@ constructor(trustPinned: Array<TrustManager>, acceptedTlsVersions: List<TlsVersi
}

private fun enableTLSOnSocket(socket: Socket?): Socket? {
if (socket is SSLSocket) {
val supportedProtocols = socket.supportedProtocols.toSet()
val filteredEnabledProtocols = enabledProtocols.filter { it in supportedProtocols }
if (socket != null && socket is SSLSocket) {
val sslSocket = socket as SSLSocket?

if (filteredEnabledProtocols.isNotEmpty()) {
val supportedProtocols = Arrays.asList(*sslSocket!!.supportedProtocols)
val filteredEnabledProtocols = ArrayList<String>()

for (protocol in enabledProtocols) {
if (supportedProtocols.contains(protocol)) {
filteredEnabledProtocols.add(protocol)
}
}

if (!filteredEnabledProtocols.isEmpty()) {
try {
socket.enabledProtocols = filteredEnabledProtocols.toTypedArray()
sslSocket.enabledProtocols = filteredEnabledProtocols.toTypedArray()
} catch (e: Exception) {
Timber.e(e)
}

}
}
return socket

View File

@ -15,7 +15,6 @@
*/
package im.vector.matrix.android.internal.session

import androidx.annotation.StringRes
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import im.vector.matrix.android.api.session.InitialSyncProgressService
@ -26,33 +25,31 @@ import javax.inject.Inject
@SessionScope
class DefaultInitialSyncProgressService @Inject constructor() : InitialSyncProgressService {

private var status = MutableLiveData<InitialSyncProgressService.Status>()
var status = MutableLiveData<InitialSyncProgressService.Status>()

private var rootTask: TaskInfo? = null
var rootTask: TaskInfo? = null

override fun getInitialSyncProgressStatus(): LiveData<InitialSyncProgressService.Status?> {
override fun getLiveStatus(): LiveData<InitialSyncProgressService.Status?> {
return status
}

fun startTask(@StringRes nameRes: Int, totalProgress: Int, parentWeight: Float = 1f) {
// Create a rootTask, or add a child to the leaf

fun startTask(nameRes: Int, totalProgress: Int, parentWeight: Float = 1f) {
if (rootTask == null) {
rootTask = TaskInfo(nameRes, totalProgress)
} else {
val currentLeaf = rootTask!!.leaf()

val newTask = TaskInfo(nameRes,
totalProgress,
currentLeaf,
parentWeight)

val newTask = TaskInfo(nameRes, totalProgress)
newTask.parent = currentLeaf
newTask.offset = currentLeaf.currentProgress
currentLeaf.child = newTask
newTask.parentWeight = parentWeight
}
reportProgress(0)
}

fun reportProgress(progress: Int) {
rootTask?.leaf()?.setProgress(progress)
rootTask?.leaf()?.incrementProgress(progress)
}

fun endTask(nameRes: Int) {
@ -61,7 +58,7 @@ class DefaultInitialSyncProgressService @Inject constructor() : InitialSyncProgr
//close it
val parent = endedTask.parent
parent?.child = null
parent?.setProgress(endedTask.offset + (endedTask.totalProgress * endedTask.parentWeight).toInt())
parent?.incrementProgress(endedTask.offset + (endedTask.totalProgress * endedTask.parentWeight).toInt())
}
if (endedTask?.parent == null) {
status.postValue(null)
@ -74,17 +71,14 @@ class DefaultInitialSyncProgressService @Inject constructor() : InitialSyncProgr
}


private inner class TaskInfo(@StringRes var nameRes: Int,
var totalProgress: Int,
var parent: TaskInfo? = null,
var parentWeight: Float = 1f,
var offset: Int = parent?.currentProgress ?: 0) {
inner class TaskInfo(var nameRes: Int,
var totalProgress: Int) {
var parent: TaskInfo? = null
var child: TaskInfo? = null
var parentWeight: Float = 1f
var currentProgress: Int = 0
var offset: Int = 0

/**
* Get the further child
*/
fun leaf(): TaskInfo {
var last = this
while (last.child != null) {
@ -93,27 +87,26 @@ class DefaultInitialSyncProgressService @Inject constructor() : InitialSyncProgr
return last
}

/**
* Set progress of the parent if any (which will post value), or post the value
*/
fun setProgress(progress: Int) {
fun incrementProgress(progress: Int) {
currentProgress = progress
// val newProgress = Math.min(currentProgress + progress, totalProgress)
parent?.let {
val parentProgress = (currentProgress * parentWeight).toInt()
it.setProgress(offset + parentProgress)
} ?: run {
Timber.e("--- ${leaf().nameRes}: $currentProgress")
it.incrementProgress(offset + parentProgress)
}
if (parent == null) {
Timber.e("--- ${leaf().nameRes}: ${currentProgress}")
status.postValue(
InitialSyncProgressService.Status(leaf().nameRes, currentProgress)
)
}
}
}

}

inline fun <T> reportSubtask(reporter: DefaultInitialSyncProgressService?,
@StringRes nameRes: Int,
nameRes: Int,
totalProgress: Int,
parentWeight: Float = 1f,
block: () -> T): T {
@ -128,11 +121,11 @@ inline fun <K, V, R> Map<out K, V>.mapWithProgress(reporter: DefaultInitialSyncP
taskId: Int,
weight: Float,
transform: (Map.Entry<K, V>) -> R): List<R> {
val total = count().toFloat()
val total = count()
var current = 0
reporter?.startTask(taskId, 100, weight)
return map {
reporter?.reportProgress((current / total * 100).toInt())
return this.map {
reporter?.reportProgress((current / total.toFloat() * 100).toInt())
current++
transform.invoke(it)
}.also {

View File

@ -40,7 +40,7 @@ import im.vector.matrix.android.api.session.sync.FilterService
import im.vector.matrix.android.api.session.sync.SyncState
import im.vector.matrix.android.api.session.user.UserService
import im.vector.matrix.android.api.util.MatrixCallbackDelegate
import im.vector.matrix.android.internal.crypto.DefaultCryptoService
import im.vector.matrix.android.internal.crypto.CryptoManager
import im.vector.matrix.android.internal.database.LiveEntityObserver
import im.vector.matrix.android.internal.session.sync.job.SyncThread
import im.vector.matrix.android.internal.session.sync.job.SyncWorker
@ -63,7 +63,7 @@ internal class DefaultSession @Inject constructor(override val sessionParams: Se
private val signOutService: Lazy<SignOutService>,
private val pushRuleService: Lazy<PushRuleService>,
private val pushersService: Lazy<PushersService>,
private val cryptoService: Lazy<DefaultCryptoService>,
private val cryptoService: Lazy<CryptoManager>,
private val fileService: Lazy<FileService>,
private val syncThreadProvider: Provider<SyncThread>,
private val contentUrlResolver: ContentUrlResolver,

View File

@ -30,8 +30,9 @@ internal class DefaultContentUploadStateTracker @Inject constructor() : ContentU
private val listeners = mutableMapOf<String, MutableList<ContentUploadStateTracker.UpdateListener>>()

override fun track(key: String, updateListener: ContentUploadStateTracker.UpdateListener) {
val listeners = listeners.getOrPut(key) { ArrayList() }
val listeners = listeners[key] ?: ArrayList()
listeners.add(updateListener)
this.listeners[key] = listeners
val currentState = states[key] ?: ContentUploadStateTracker.State.Idle
mainHandler.post { updateListener.onUpdate(currentState) }
}

View File

@ -32,7 +32,7 @@ import im.vector.matrix.android.internal.task.configureWith
import im.vector.matrix.android.internal.worker.WorkManagerUtil
import im.vector.matrix.android.internal.worker.WorkManagerUtil.matrixOneTimeWorkRequestBuilder
import im.vector.matrix.android.internal.worker.WorkerParamsFactory
import java.util.UUID
import java.util.*
import java.util.concurrent.TimeUnit
import javax.inject.Inject


View File

@ -58,7 +58,7 @@ internal class DefaultRoom @Inject constructor(override val roomId: String,
RoomSummaryEntity.where(realm, roomId).isNotEmpty(RoomSummaryEntityFields.DISPLAY_NAME)
}
return Transformations.map(liveRealmData) { results ->
val roomSummaries = results.map { roomSummaryMapper.map(it) }
val roomSummaries = results.map { roomSummaryMapper.map(it, this) }

if (roomSummaries.isEmpty()) {
// Create a dummy RoomSummary to avoid Crash during Sign Out or clear cache
@ -72,7 +72,7 @@ internal class DefaultRoom @Inject constructor(override val roomId: String,
override fun roomSummary(): RoomSummary? {
return monarchy.fetchAllMappedSync(
{ realm -> RoomSummaryEntity.where(realm, roomId).isNotEmpty(RoomSummaryEntityFields.DISPLAY_NAME) },
{ roomSummaryMapper.map(it) }
{ roomSummaryMapper.map(it, this) }
).firstOrNull()
}


View File

@ -24,6 +24,7 @@ import im.vector.matrix.android.api.session.room.RoomService
import im.vector.matrix.android.api.session.room.model.RoomSummary
import im.vector.matrix.android.api.session.room.model.VersioningState
import im.vector.matrix.android.api.session.room.model.create.CreateRoomParams
import im.vector.matrix.android.api.session.room.read.ReadService
import im.vector.matrix.android.api.util.Cancelable
import im.vector.matrix.android.internal.database.mapper.RoomSummaryMapper
import im.vector.matrix.android.internal.database.model.RoomEntity
@ -69,7 +70,7 @@ internal class DefaultRoomService @Inject constructor(private val monarchy: Mona
.isNotEmpty(RoomSummaryEntityFields.DISPLAY_NAME)
.notEqualTo(RoomSummaryEntityFields.VERSIONING_STATE_STR, VersioningState.UPGRADED_ROOM_JOINED.name)
},
{ roomSummaryMapper.map(it) }
{ roomSummaryMapper.map(it, getRoom(it.roomId)) }
)
}


View File

@ -85,7 +85,7 @@ internal class RoomSummaryUpdater @Inject constructor(private val credentials: C
roomSummaryEntity.membership = membership
}

val latestEvent = TimelineEventEntity.latestEvent(realm, roomId, includesSending = true, includedTypes = PREVIEWABLE_TYPES)
val latestPreviewableEvent = TimelineEventEntity.latestEvent(realm, roomId, includesSending = true, includedTypes = PREVIEWABLE_TYPES)
val lastTopicEvent = EventEntity.where(realm, roomId, EventType.STATE_ROOM_TOPIC).prev()?.asDomain()

val otherRoomMembers = RoomMembers(realm, roomId)
@ -98,7 +98,7 @@ internal class RoomSummaryUpdater @Inject constructor(private val credentials: C
roomSummaryEntity.displayName = roomDisplayNameResolver.resolve(roomId).toString()
roomSummaryEntity.avatarUrl = roomAvatarResolver.resolve(roomId)
roomSummaryEntity.topic = lastTopicEvent?.content.toModel<RoomTopicContent>()?.topic
roomSummaryEntity.latestEvent = latestEvent
roomSummaryEntity.latestPreviewableEvent = latestPreviewableEvent
roomSummaryEntity.otherMemberIds.clear()
roomSummaryEntity.otherMemberIds.addAll(otherRoomMembers)


View File

@ -38,7 +38,7 @@ import im.vector.matrix.android.internal.session.room.RoomSummaryUpdater
import im.vector.matrix.android.internal.util.StringProvider
import org.commonmark.parser.Parser
import org.commonmark.renderer.html.HtmlRenderer
import java.util.UUID
import java.util.*
import javax.inject.Inject

/**
@ -304,22 +304,17 @@ internal class LocalEchoEventFactory @Inject constructor(private val credentials
}

private fun buildReplyFallback(body: TextContent, originalSenderId: String?, newBodyText: String): String {
return buildString {
append("> <")
append(originalSenderId)
append(">")

val lines = body.text.split("\n")
val replyFallback = StringBuffer("> <$originalSenderId>")
lines.forEachIndexed { index, s ->
if (index == 0) {
append(" $s")
replyFallback.append(" $s")
} else {
append("\n> $s")
replyFallback.append("\n> $s")
}
}
append("\n\n")
append(newBodyText)
}
replyFallback.append("\n\n").append(newBodyText)
return replyFallback.toString()
}

/**

View File

@ -22,7 +22,7 @@ import im.vector.matrix.android.api.session.events.model.Event
import im.vector.matrix.android.api.session.events.model.EventType
import im.vector.matrix.android.api.session.events.model.toModel
import im.vector.matrix.android.api.session.room.model.message.MessageContent
import im.vector.matrix.android.internal.crypto.DefaultCryptoService
import im.vector.matrix.android.internal.crypto.CryptoManager
import im.vector.matrix.android.internal.crypto.MXEventDecryptionResult
import im.vector.matrix.android.internal.crypto.algorithms.olm.OlmDecryptionResult
import im.vector.matrix.android.internal.crypto.verification.DefaultSasVerificationService
@ -33,7 +33,7 @@ import timber.log.Timber
import javax.inject.Inject


internal class CryptoSyncHandler @Inject constructor(private val cryptoService: DefaultCryptoService,
internal class CryptoSyncHandler @Inject constructor(private val cryptoManager: CryptoManager,
private val sasVerificationService: DefaultSasVerificationService) {

fun handleToDevice(toDevice: ToDeviceSyncResponse, initialSyncProgressService: DefaultInitialSyncProgressService? = null) {
@ -47,13 +47,13 @@ internal class CryptoSyncHandler @Inject constructor(private val cryptoService:
Timber.e("## handleToDeviceEvent() : Warning: Unable to decrypt to-device event : " + event.content)
} else {
sasVerificationService.onToDeviceEvent(event)
cryptoService.onToDeviceEvent(event)
cryptoManager.onToDeviceEvent(event)
}
}
}

fun onSyncCompleted(syncResponse: SyncResponse) {
cryptoService.onSyncCompleted(syncResponse)
cryptoManager.onSyncCompleted(syncResponse)
}


@ -68,7 +68,7 @@ internal class CryptoSyncHandler @Inject constructor(private val cryptoService:
if (event.getClearType() == EventType.ENCRYPTED) {
var result: MXEventDecryptionResult? = null
try {
result = cryptoService.decryptEvent(event, timelineId ?: "")
result = cryptoManager.decryptEvent(event, timelineId ?: "")
} catch (exception: MXCryptoError) {
event.mCryptoError = (exception as? MXCryptoError.Base)?.errorType //setCryptoError(exception.cryptoError)
}

View File

@ -23,7 +23,7 @@ import im.vector.matrix.android.api.session.events.model.EventType
import im.vector.matrix.android.api.session.events.model.toModel
import im.vector.matrix.android.api.session.room.model.Membership
import im.vector.matrix.android.api.session.room.model.tag.RoomTagContent
import im.vector.matrix.android.internal.crypto.DefaultCryptoService
import im.vector.matrix.android.internal.crypto.CryptoManager
import im.vector.matrix.android.internal.database.helper.*
import im.vector.matrix.android.internal.database.model.ChunkEntity
import im.vector.matrix.android.internal.database.model.EventEntityFields
@ -50,7 +50,7 @@ internal class RoomSyncHandler @Inject constructor(private val monarchy: Monarch
private val readReceiptHandler: ReadReceiptHandler,
private val roomSummaryUpdater: RoomSummaryUpdater,
private val roomTagHandler: RoomTagHandler,
private val cryptoService: DefaultCryptoService,
private val cryptoManager: CryptoManager,
private val tokenStore: SyncTokenStore,
private val pushRuleService: DefaultPushRuleService,
private val processForPushTask: ProcessEventForPushTask,
@ -97,12 +97,12 @@ internal class RoomSyncHandler @Inject constructor(private val monarchy: Monarch
handleJoinedRoom(realm, it.key, it.value, isInitialSync)
}
is HandlingStrategy.INVITED ->
handlingStrategy.data.mapWithProgress(reporter, R.string.initial_sync_start_importing_account_invited_rooms, 0.1f) {
handlingStrategy.data.mapWithProgress(reporter, R.string.initial_sync_start_importing_account_invited_rooms, 0.4f) {
handleInvitedRoom(realm, it.key, it.value)
}

is HandlingStrategy.LEFT -> {
handlingStrategy.data.mapWithProgress(reporter, R.string.initial_sync_start_importing_account_left_rooms, 0.3f) {
handlingStrategy.data.mapWithProgress(reporter, R.string.initial_sync_start_importing_account_left_rooms, 0.2f) {
handleLeftRoom(realm, it.key, it.value)
}
}
@ -113,19 +113,20 @@ internal class RoomSyncHandler @Inject constructor(private val monarchy: Monarch
private fun handleJoinedRoom(realm: Realm,
roomId: String,
roomSync: RoomSync,
isInitalSync: Boolean): RoomEntity {
isInitialSync: Boolean): RoomEntity {

Timber.v("Handle join sync for room $roomId")

if (roomSync.ephemeral != null && roomSync.ephemeral.events.isNotEmpty()) {
handleEphemeral(realm, roomId, roomSync.ephemeral, isInitalSync)
handleEphemeral(realm, roomId, roomSync.ephemeral, isInitialSync)
}

if (roomSync.accountData != null && roomSync.accountData.events.isNullOrEmpty().not()) {
handleRoomAccountDataEvents(realm, roomId, roomSync.accountData)
}

val roomEntity = RoomEntity.where(realm, roomId).findFirst() ?: realm.createObject(roomId)
val roomEntity = RoomEntity.where(realm, roomId).findFirst()
?: realm.createObject(roomId)

if (roomEntity.membership == Membership.INVITE) {
roomEntity.chunks.deleteAllFromRealm()
@ -134,12 +135,13 @@ internal class RoomSyncHandler @Inject constructor(private val monarchy: Monarch

// State event
if (roomSync.state != null && roomSync.state.events.isNotEmpty()) {
val minStateIndex = roomEntity.untimelinedStateEvents.where().min(EventEntityFields.STATE_INDEX)?.toInt() ?: Int.MIN_VALUE
val minStateIndex = roomEntity.untimelinedStateEvents.where().min(EventEntityFields.STATE_INDEX)?.toInt()
?: Int.MIN_VALUE
val untimelinedStateIndex = minStateIndex + 1
roomSync.state.events.forEach { event ->
roomEntity.addStateEvent(event, filterDuplicates = true, stateIndex = untimelinedStateIndex)
// Give info to crypto module
cryptoService.onStateEvent(roomId, event)
cryptoManager.onStateEvent(roomId, event)
UserEntityFactory.createOrNull(event)?.also {
realm.insertOrUpdate(it)
}
@ -165,7 +167,8 @@ internal class RoomSyncHandler @Inject constructor(private val monarchy: Monarch
roomSync:
InvitedRoomSync): RoomEntity {
Timber.v("Handle invited sync for room $roomId")
val roomEntity = RoomEntity.where(realm, roomId).findFirst() ?: realm.createObject(roomId)
val roomEntity = RoomEntity.where(realm, roomId).findFirst()
?: realm.createObject(roomId)
roomEntity.membership = Membership.INVITE
if (roomSync.inviteState != null && roomSync.inviteState.events.isNotEmpty()) {
val chunkEntity = handleTimelineEvents(realm, roomEntity, roomSync.inviteState.events)
@ -178,7 +181,8 @@ internal class RoomSyncHandler @Inject constructor(private val monarchy: Monarch
private fun handleLeftRoom(realm: Realm,
roomId: String,
roomSync: RoomSync): RoomEntity {
val roomEntity = RoomEntity.where(realm, roomId).findFirst() ?: realm.createObject(roomId)
val roomEntity = RoomEntity.where(realm, roomId).findFirst()
?: realm.createObject(roomId)

roomEntity.membership = Membership.LEAVE
roomEntity.chunks.deleteAllFromRealm()
@ -210,7 +214,7 @@ internal class RoomSyncHandler @Inject constructor(private val monarchy: Monarch
event.eventId?.also { eventIds.add(it) }
chunkEntity.add(roomEntity.roomId, event, PaginationDirection.FORWARDS, stateIndexOffset)
// Give info to crypto module
cryptoService.onLiveEvent(roomEntity.roomId, event)
cryptoManager.onLiveEvent(roomEntity.roomId, event)
// Try to remove local echo
event.unsignedData?.transactionId?.also {
val sendingEventEntity = roomEntity.sendingTimelineEvents.find(it)

View File

@ -21,6 +21,7 @@ import im.vector.matrix.android.internal.database.model.RoomSummaryEntity
import im.vector.matrix.android.internal.database.model.RoomTagEntity
import im.vector.matrix.android.internal.database.query.where
import io.realm.Realm
import java.util.*
import javax.inject.Inject

internal class RoomTagHandler @Inject constructor() {
@ -29,8 +30,16 @@ internal class RoomTagHandler @Inject constructor() {
if (content == null) {
return
}
val tags = content.tags.entries.map { (tagName, params) ->
RoomTagEntity(tagName, params["order"] as? Double)
val tags = ArrayList<RoomTagEntity>()
for (tagName in content.tags.keys) {
val params = content.tags[tagName]
val order = params?.get("order")
val tag = if (order is Double) {
RoomTagEntity(tagName, order)
} else {
RoomTagEntity(tagName, null)
}
tags.add(tag)
}
val roomSummaryEntity = RoomSummaryEntity.where(realm, roomId).findFirst()
?: RoomSummaryEntity(roomId)

View File

@ -18,7 +18,7 @@ package im.vector.matrix.android.internal.session.sync

import arrow.core.Try
import im.vector.matrix.android.R
import im.vector.matrix.android.internal.crypto.DefaultCryptoService
import im.vector.matrix.android.internal.crypto.CryptoManager
import im.vector.matrix.android.internal.session.DefaultInitialSyncProgressService
import im.vector.matrix.android.internal.session.reportSubtask
import im.vector.matrix.android.internal.session.sync.model.SyncResponse
@ -30,7 +30,7 @@ internal class SyncResponseHandler @Inject constructor(private val roomSyncHandl
private val userAccountDataSyncHandler: UserAccountDataSyncHandler,
private val groupSyncHandler: GroupSyncHandler,
private val cryptoSyncHandler: CryptoSyncHandler,
private val cryptoService: DefaultCryptoService,
private val cryptoManager: CryptoManager,
private val initialSyncProgressService: DefaultInitialSyncProgressService) {

fun handleResponse(syncResponse: SyncResponse, fromToken: String?, isCatchingUp: Boolean): Try<SyncResponse> {
@ -40,12 +40,12 @@ internal class SyncResponseHandler @Inject constructor(private val roomSyncHandl
val reporter = initialSyncProgressService.takeIf { isInitialSync }

measureTimeMillis {
if (!cryptoService.isStarted()) {
Timber.v("Should start cryptoService")
cryptoService.start(isInitialSync)
if (!cryptoManager.isStarted()) {
Timber.v("Should start cryptoManager")
cryptoManager.start(isInitialSync)
}
}.also {
Timber.v("Finish handling start cryptoService in $it ms")
Timber.v("Finish handling start cryptoManager in $it ms")
}
val measure = measureTimeMillis {
// Handle the to device events before the room ones

View File

@ -19,7 +19,7 @@ package im.vector.matrix.android.internal.util
import android.content.Context
import androidx.work.WorkManager
import im.vector.matrix.android.api.util.Cancelable
import java.util.UUID
import java.util.*

internal class CancelableWork(private val context: Context,
private val workId: UUID) : Cancelable {

View File

@ -34,7 +34,7 @@ import java.security.*
import java.security.cert.CertificateException
import java.security.spec.AlgorithmParameterSpec
import java.security.spec.RSAKeyGenParameterSpec
import java.util.Calendar
import java.util.*
import java.util.zip.GZIPOutputStream
import javax.crypto.*
import javax.crypto.spec.GCMParameterSpec

View File

@ -22,7 +22,7 @@ import org.json.JSONArray
import org.json.JSONException
import org.json.JSONObject
import timber.log.Timber
import java.util.TreeSet
import java.util.*

/**
* Build canonical Json
@ -60,33 +60,43 @@ object JsonCanonicalizer {
when (any) {
is JSONArray -> {
// Canonicalize each element of the array
return (0 until any.length()).joinToString(separator = ",", prefix = "[", postfix = "]") {
canonicalizeRecursive(any.get(it))
val result = StringBuilder("[")

for (i in 0 until any.length()) {
result.append(canonicalizeRecursive(any.get(i)))
if (i < any.length() - 1) {
result.append(",")
}
}

result.append("]")

return result.toString()
}
is JSONObject -> {
// Sort the attributes by name, and the canonicalize each element of the JSONObject
val result = StringBuilder("{")

val attributes = TreeSet<String>()
for (entry in any.keys()) {
attributes.add(entry)
}

return buildString {
append("{")
for ((index, value) in attributes.withIndex()) {
append("\"")
append(value)
append("\"")
append(":")
append(canonicalizeRecursive(any[value]))
for (attribute in attributes.withIndex()) {
result.append("\"")
.append(attribute.value)
.append("\"")
.append(":")
.append(canonicalizeRecursive(any[attribute.value]))

if (index < attributes.size - 1) {
append(",")
if (attribute.index < attributes.size - 1) {
result.append(",")
}
}
append("}")
}

result.append("}")

return result.toString()
}
is String -> return JSONObject.quote(any)
else -> return any.toString()

View File

@ -167,9 +167,4 @@
<string name="initial_sync_start_importing_account_data">Начална синхронизация:
\nИмпортиране на данни за профила</string>

<string name="notice_room_update">%s обнови тази стая.</string>

<string name="event_status_sending_message">Изпращане на съобщение…</string>
<string name="clear_timeline_send_queue">Изчисти опашката за изпращане</string>

</resources>

View File

@ -105,65 +105,4 @@
<string name="verification_emoji_pig">Schwein</string>
<string name="verification_emoji_elephant">Elefant</string>
<string name="verification_emoji_rabbit">Hase</string>
<string name="notice_room_update">%s hat diesen Raum aufgewertet.</string>

<string name="verification_emoji_panda">Panda</string>
<string name="verification_emoji_rooster">Hahn</string>
<string name="verification_emoji_penguin">Pinguin</string>
<string name="verification_emoji_turtle">Schildkröte</string>
<string name="verification_emoji_fish">Fisch</string>
<string name="verification_emoji_octopus">Tintenfisch</string>
<string name="verification_emoji_butterfly">Schmetterling</string>
<string name="verification_emoji_flower">Blume</string>
<string name="verification_emoji_tree">Baum</string>
<string name="verification_emoji_cactus">Kaktus</string>
<string name="verification_emoji_mushroom">Pilz</string>
<string name="verification_emoji_globe">Globus</string>
<string name="verification_emoji_moon">Mond</string>
<string name="verification_emoji_cloud">Wolke</string>
<string name="verification_emoji_fire">Feuer</string>
<string name="verification_emoji_banana">Banane</string>
<string name="verification_emoji_apple">Apfel</string>
<string name="verification_emoji_strawberry">Erdbeere</string>
<string name="verification_emoji_corn">Mais</string>
<string name="verification_emoji_cake">Kuchen</string>
<string name="verification_emoji_heart">Herz</string>
<string name="verification_emoji_smiley">Lächeln</string>
<string name="verification_emoji_robot">Roboter</string>
<string name="verification_emoji_hat">Hut</string>
<string name="verification_emoji_glasses">Brille</string>
<string name="verification_emoji_wrench">Schraubenschlüssel</string>
<string name="verification_emoji_santa">Nikolaus</string>
<string name="verification_emoji_thumbsup">Daumen hoch</string>
<string name="verification_emoji_umbrella">Regenschirm</string>
<string name="verification_emoji_hourglass">Sanduhr</string>
<string name="verification_emoji_clock">Uhr</string>
<string name="verification_emoji_gift">Geschenk</string>
<string name="verification_emoji_lightbulb">Glühbirne</string>
<string name="verification_emoji_book">Buch</string>
<string name="verification_emoji_pencil">Stift</string>
<string name="verification_emoji_paperclip">Büroklammer</string>
<string name="verification_emoji_scissors">Scheren</string>
<string name="verification_emoji_lock">sperren</string>
<string name="verification_emoji_key">Schlüssel</string>
<string name="verification_emoji_hammer">Hammer</string>
<string name="verification_emoji_telephone">Telefon</string>
<string name="verification_emoji_flag">Flagge</string>
<string name="verification_emoji_train">Zug</string>
<string name="verification_emoji_bicycle">Fahrrad</string>
<string name="verification_emoji_airplane">Flugzeug</string>
<string name="verification_emoji_rocket">Rakete</string>
<string name="verification_emoji_trophy">Pokal</string>
<string name="verification_emoji_ball">Ball</string>
<string name="verification_emoji_guitar">Gitarre</string>
<string name="verification_emoji_trumpet">Trompete</string>
<string name="verification_emoji_bell">Glocke</string>
<string name="verification_emoji_anchor">Anker</string>
<string name="verification_emoji_headphone">Kopfhörer</string>
<string name="verification_emoji_folder">Ordner</string>
<string name="verification_emoji_pin">Stecknadel</string>

<string name="event_status_sending_message">Sende eine Nachricht…</string>
<string name="clear_timeline_send_queue">Sendewarteschlange leeren</string>

</resources>

View File

@ -167,9 +167,4 @@
<string name="initial_sync_start_importing_account_data">Hasierako sinkronizazioa:
\nKontuaren datuak inportatzen</string>

<string name="notice_room_update">%s erabiltzaileak gela hau eguneratu du.</string>

<string name="event_status_sending_message">Mezua bidaltzen…</string>
<string name="clear_timeline_send_queue">Garbitu bidalketa-ilara</string>

</resources>

View File

@ -168,9 +168,4 @@
<string name="initial_sync_start_importing_account_data">Alkusynkronointi:
\nTuodaan tilin tietoja</string>

<string name="notice_room_update">%s päivitti tämän huoneen.</string>

<string name="event_status_sending_message">Lähetetään viestiä…</string>
<string name="clear_timeline_send_queue">Tyhjennä lähetysjono</string>

</resources>

View File

@ -167,9 +167,4 @@
<string name="initial_sync_start_importing_account_data">Synchronisation initiale :
\nImportation des données du compte</string>

<string name="notice_room_update">%s a mis à niveau ce salon.</string>

<string name="event_status_sending_message">Envoi du message…</string>
<string name="clear_timeline_send_queue">Vider la file denvoi</string>

</resources>

View File

@ -166,9 +166,4 @@
<string name="initial_sync_start_importing_account_data">Induló szinkronizáció:
\nFiók adatok betöltése</string>

<string name="notice_room_update">%s frissítette ezt a szobát.</string>

<string name="event_status_sending_message">Üzenet küldése…</string>
<string name="clear_timeline_send_queue">Küldő sor ürítése</string>

</resources>

View File

@ -167,9 +167,4 @@
<string name="initial_sync_start_importing_account_data">Sync iniziale:
\nImportazione dati account</string>

<string name="notice_room_update">%s ha aggiornato questa stanza.</string>

<string name="event_status_sending_message">Invio messaggio in corso …</string>
<string name="clear_timeline_send_queue">Cancella la coda di invio</string>

</resources>

View File

@ -1,173 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<resources>
<string name="summary_message">%1$s: %2$s</string>
<string name="notice_room_invite_no_invitee">%s님의 초대</string>
<string name="notice_room_invite_no_invitee">%s\'의 초대</string>
<string name="verification_emoji_headphone">헤드폰</string>
<string name="summary_user_sent_image">%1$s님이 사진을 보냈습니다.</string>
<string name="summary_user_sent_sticker">%1$s님이 스티커를 보냈습니다.</string>

<string name="notice_room_invite">%1$s님이 %2$s님을 초대했습니다</string>
<string name="notice_room_invite_you">%1$s님이 당신을 초대했습니다</string>
<string name="notice_room_join">%1$s님이 참가했습니다</string>
<string name="notice_room_leave">%1$s님이 떠났습니다</string>
<string name="notice_room_reject">%1$s님이 초대를 거부했습니다</string>
<string name="notice_room_kick">%1$s님이 %2$s님을 추방했습니다</string>
<string name="notice_room_unban">%1$s님이 %2$s님의 차단을 풀었습니다</string>
<string name="notice_room_ban">%1$s님이 %2$s님을 차단했습니다</string>
<string name="notice_room_withdraw">%1$s님이 %2$s님의 초대를 취소했습니다</string>
<string name="notice_avatar_url_changed">%1$s님이 아바타를 변경했습니다</string>
<string name="notice_display_name_set">%1$s님이 표시 이름을 %2$s(으)로 설정했습니다</string>
<string name="notice_display_name_changed_from">%1$s님이 표시 이름을 %2$s에서 %3$s(으)로 변경했습니다</string>
<string name="notice_display_name_removed">%1$s님이 표시 이름을 삭제했습니다 (%2$s)</string>
<string name="notice_room_topic_changed">%1$s님이 주제를 다음으로 변경했습니다: %2$s</string>
<string name="notice_room_name_changed">%1$s님이 방 이름을 다음으로 변경했습니다: %2$s</string>
<string name="notice_placed_video_call">%s님이 영상 통화를 걸었습니다.</string>
<string name="notice_placed_voice_call">%s님이 음성 통화를 걸었습니다.</string>
<string name="notice_answered_call">%s님이 전화를 받았습니다.</string>
<string name="notice_ended_call">%s님이 전화를 끊었습니다.</string>
<string name="notice_made_future_room_visibility">%1$s님이 이후 %2$s에게 방 기록을 공개했습니다</string>
<string name="notice_room_visibility_invited">초대된 시점부터 모든 방 구성원.</string>
<string name="notice_room_visibility_joined">들어온 시점부터 모든 방 구성원.</string>
<string name="notice_room_visibility_shared">모든 방 구성원.</string>
<string name="notice_room_visibility_world_readable">누구나.</string>
<string name="notice_room_visibility_unknown">알 수 없음 (%s).</string>
<string name="notice_end_to_end">%1$s님이 종단 간 암호화를 켰습니다 (%2$s)</string>
<string name="notice_room_update">%s님이 방을 업그레이드했습니다.</string>

<string name="notice_requested_voip_conference">%1$s님이 VoIP 회의를 요청했습니다</string>
<string name="notice_voip_started">VoIP 회의가 시작했습니다</string>
<string name="notice_voip_finished">VoIP 회의가 끝났습니다</string>

<string name="notice_avatar_changed_too">(아바타도 변경됨)</string>
<string name="notice_room_name_removed">%1$s님이 방 이름을 삭제했습니다</string>
<string name="notice_room_topic_removed">%1$s님이 방 주제를 삭제했습니다</string>
<string name="notice_event_redacted">메시지가 삭제되었습니다</string>
<string name="notice_event_redacted_by">메시지가 %1$s님에 의해 삭제되었습니다</string>
<string name="notice_event_redacted_with_reason">메시지가 삭제되었습니다 [이유: %1$s]</string>
<string name="notice_event_redacted_by_with_reason">메시지가 %1$s님에 의해 삭제되었습니다 [이유: %2$s]</string>
<string name="notice_profile_change_redacted">%1$s님이 프로필 %2$s을(를) 업데이트했습니다</string>
<string name="notice_room_third_party_invite">%1$s님이 %2$s님에게 방 초대를 보냈습니다</string>
<string name="notice_room_third_party_registered_invite">%1$s님이 %2$s의 초대를 수락했습니다</string>

<string name="notice_crypto_unable_to_decrypt">** 암호를 해독할 수 없음: %s **</string>
<string name="notice_crypto_error_unkwown_inbound_session_id">발신인의 기기에서 이 메시지의 키를 보내지 않았습니다.</string>

<string name="message_reply_to_prefix">이 답장의 질문</string>

<string name="could_not_redact">검열할 수 없습니다</string>
<string name="unable_to_send_message">메시지를 보낼 수 없습니다</string>

<string name="message_failed_to_upload">사진 업로드에 실패했습니다</string>

<string name="network_error">네트워크 오류</string>
<string name="matrix_error">Matrix 오류</string>

<string name="room_error_join_failed_empty_room">현재 빈 방에 다시 들어갈 수 없습니다.</string>

<string name="encrypted_message">암호화된 메시지</string>

<string name="medium_email">이메일 주소</string>
<string name="medium_phone_number">전화번호</string>

<string name="reply_to_an_image">사진을 보냈습니다.</string>
<string name="reply_to_a_video">동영상을 보냈습니다.</string>
<string name="reply_to_an_audio_file">오디오 파일을 보냈습니다.</string>
<string name="reply_to_a_file">파일을 보냈습니다.</string>

<string name="room_displayname_invite_from">%s에서 초대함</string>
<string name="room_displayname_room_invite">방 초대</string>

<string name="room_displayname_two_members">%1$s님과 %2$s님</string>

<plurals name="room_displayname_three_and_more_members">
<item quantity="other">%1$s님 외 %2$d명</item>
</plurals>

<string name="room_displayname_empty_room">빈 방</string>


<string name="verification_emoji_dog">개</string>
<string name="verification_emoji_cat">고양이</string>
<string name="verification_emoji_lion">사자</string>
<string name="verification_emoji_horse">말</string>
<string name="verification_emoji_unicorn">유니콘</string>
<string name="verification_emoji_pig">돼지</string>
<string name="verification_emoji_elephant">코끼리</string>
<string name="verification_emoji_rabbit">토끼</string>
<string name="verification_emoji_panda">판다</string>
<string name="verification_emoji_rooster">수탉</string>
<string name="verification_emoji_penguin">펭귄</string>
<string name="verification_emoji_turtle">거북</string>
<string name="verification_emoji_fish">물고기</string>
<string name="verification_emoji_octopus">문어</string>
<string name="verification_emoji_butterfly">나비</string>
<string name="verification_emoji_flower">꽃</string>
<string name="verification_emoji_tree">나무</string>
<string name="verification_emoji_cactus">선인장</string>
<string name="verification_emoji_mushroom">버섯</string>
<string name="verification_emoji_globe">지구본</string>
<string name="verification_emoji_moon">달</string>
<string name="verification_emoji_cloud">구름</string>
<string name="verification_emoji_fire">불</string>
<string name="verification_emoji_banana">바나나</string>
<string name="verification_emoji_apple">사과</string>
<string name="verification_emoji_strawberry">딸기</string>
<string name="verification_emoji_corn">옥수수</string>
<string name="verification_emoji_pizza">피자</string>
<string name="verification_emoji_cake">케이크</string>
<string name="verification_emoji_heart">하트</string>
<string name="verification_emoji_smiley">웃음</string>
<string name="verification_emoji_robot">로봇</string>
<string name="verification_emoji_hat">모자</string>
<string name="verification_emoji_glasses">안경</string>
<string name="verification_emoji_wrench">스패너</string>
<string name="verification_emoji_santa">산타클로스</string>
<string name="verification_emoji_thumbsup">좋아요</string>
<string name="verification_emoji_umbrella">우산</string>
<string name="verification_emoji_hourglass">모래시계</string>
<string name="verification_emoji_clock">시계</string>
<string name="verification_emoji_gift">선물</string>
<string name="verification_emoji_lightbulb">전구</string>
<string name="verification_emoji_book">책</string>
<string name="verification_emoji_pencil">연필</string>
<string name="verification_emoji_paperclip">클립</string>
<string name="verification_emoji_scissors">가위</string>
<string name="verification_emoji_lock">자물쇠</string>
<string name="verification_emoji_key">열쇠</string>
<string name="verification_emoji_hammer">망치</string>
<string name="verification_emoji_telephone">전화기</string>
<string name="verification_emoji_flag">깃발</string>
<string name="verification_emoji_train">기차</string>
<string name="verification_emoji_bicycle">자전거</string>
<string name="verification_emoji_airplane">비행기</string>
<string name="verification_emoji_rocket">로켓</string>
<string name="verification_emoji_trophy">트로피</string>
<string name="verification_emoji_ball">공</string>
<string name="verification_emoji_guitar">기타</string>
<string name="verification_emoji_trumpet">트럼펫</string>
<string name="verification_emoji_bell">종</string>
<string name="verification_emoji_anchor">닻</string>
<string name="verification_emoji_folder">폴더</string>
<string name="verification_emoji_pin">핀</string>

<string name="initial_sync_start_importing_account">초기 동기화:
\n계정 가져오는 중…</string>
<string name="initial_sync_start_importing_account_crypto">초기 동기화:
\n암호 가져오는 중</string>
<string name="initial_sync_start_importing_account_rooms">초기 동기화:
\n방 가져오는 중</string>
<string name="initial_sync_start_importing_account_joined_rooms">초기 동기화:
\n들어간 방 가져오는 중</string>
<string name="initial_sync_start_importing_account_invited_rooms">초기 동기화:
\n초대받은 방 가져오는 중</string>
<string name="initial_sync_start_importing_account_left_rooms">초기 동기화:
\n떠난 방 가져오는 중</string>
<string name="initial_sync_start_importing_account_groups">초기 동기화:
\n커뮤니티 가져오는 중</string>
<string name="initial_sync_start_importing_account_data">초기 동기화:
\n계정 데이터 가져오는 중</string>

<string name="event_status_sending_message">메시지 보내는 중…</string>
<string name="clear_timeline_send_queue">전송 대기 열 지우기</string>

</resources>

View File

@ -176,9 +176,4 @@
<string name="initial_sync_start_importing_account_data">Initiële synchronisatie:
\nAccountgegevens worden geïmporteerd</string>

<string name="notice_room_update">%s heeft dit gesprek opgewaardeerd.</string>

<string name="event_status_sending_message">Bericht wordt verstuurd…</string>
<string name="clear_timeline_send_queue">Uitgaande wachtrij legen</string>

</resources>

View File

@ -7,7 +7,7 @@
<string name="notice_room_invite">%1$s zaprosił(a) %2$s</string>
<string name="notice_room_invite_you">%1$s zaprosił(a) Cię</string>
<string name="notice_room_join">%1$s dołączył(a)</string>
<string name="notice_room_leave">%1$s opuścił(a)</string>
<string name="notice_room_leave">%1$s wyszedł(-ła)</string>
<string name="notice_room_reject">%1$s odrzucił(a) zaproszenie</string>
<string name="notice_room_kick">%1$s wyrzucił(a) %2$s</string>
<string name="notice_room_unban">%1$s odblokował(a) %2$s</string>
@ -17,11 +17,11 @@
<string name="notice_display_name_changed_from">%1$s zmienił(a) wyświetlaną nazwę z %2$s na %3$s</string>
<string name="notice_display_name_removed">%1$s usunął(-ęła) swoją wyświetlaną nazwę (%2$s)</string>
<string name="notice_room_topic_changed">%1$s zmienił(a) temat na: %2$s</string>
<string name="unable_to_send_message">Nie można wysłać wiadomości</string>
<string name="unable_to_send_message">Nie udało się wysłać wiadomości</string>

<string name="message_failed_to_upload">Przesyłanie zdjęcia nie powiodło się</string>
<string name="message_failed_to_upload">Nie udało się wysłać zdjęcia</string>

<string name="network_error">Błąd sieci</string>
<string name="network_error">ogólne błędy</string>
<string name="matrix_error">Błąd Matrixa</string>

<string name="encrypted_message">Wiadomość zaszyfrowana</string>
@ -31,7 +31,7 @@

<string name="notice_room_visibility_shared">wszyscy członkowie pokoju.</string>
<string name="notice_room_visibility_world_readable">wszyscy.</string>
<string name="notice_room_name_changed">%1$s zmienił(a) nazwę pokoju na: %2$s</string>
<string name="notice_room_name_changed">%1$s zmienił(a) znawę pokoju na: %2$s</string>
<string name="notice_ended_call">%s zakończył(a) rozmowę.</string>
<string name="notice_room_name_removed">%1$s usunął(-ęła) nazwę pokoju</string>
<string name="notice_room_topic_removed">%1$s usunął(-ęła) temat pokoju</string>
@ -57,9 +57,9 @@
</plurals>

<string name="notice_crypto_unable_to_decrypt">** Nie można odszyfrować: %s **</string>
<string name="notice_placed_video_call">%s wykonał(a) rozmowę wideo.</string>
<string name="notice_placed_voice_call">%s wykonał(a) połączenie głosowe.</string>
<string name="notice_made_future_room_visibility">%1$s uczynił(a) przyszłą historię pokoju widoczną dla %2$s</string>
<string name="notice_placed_video_call">%s umieścił wideo rozmowe.</string>
<string name="notice_placed_voice_call">%s umieścił połączenie głosowe.</string>
<string name="notice_made_future_room_visibility">%1$s uczynił historię pokoju widoczną do %2$s</string>
<string name="notice_room_visibility_invited">wszyscy członkowie pokoju, od momentu w którym zostali zaproszeni.</string>
<string name="notice_room_visibility_joined">wszyscy członkowie pokoju, od momentu w którym dołączyli.</string>
<string name="notice_room_visibility_unknown">nieznane (%s).</string>
@ -147,29 +147,4 @@
<string name="verification_emoji_santa">Mikołaj</string>
<string name="verification_emoji_gift">Prezent</string>
<string name="verification_emoji_hammer">Młotek</string>
<string name="notice_room_update">%s zakutalizował(a) ten pokój.</string>

<string name="verification_emoji_thumbsup">Kciuk w górę</string>
<string name="verification_emoji_lock">Zamek</string>
<string name="verification_emoji_ball">Piłka</string>
<string name="initial_sync_start_importing_account">Synchronizacja początkowa:
\nImportowanie konta…</string>
<string name="initial_sync_start_importing_account_crypto">Synchronizacja początkowa:
\nImportowanie kryptografii</string>
<string name="initial_sync_start_importing_account_rooms">Synchronizacja początkowa:
\nImportowanie Pokoi</string>
<string name="initial_sync_start_importing_account_joined_rooms">Synchronizacja początkowa:
\nImportowanie dołączonych Pokoi</string>
<string name="initial_sync_start_importing_account_invited_rooms">Synchronizacja początkowa:
\nImportowanie zaproszonych Pokoi</string>
<string name="initial_sync_start_importing_account_left_rooms">Synchronizacja początkowa:
\nImportowanie opuszczonych Pokoi</string>
<string name="initial_sync_start_importing_account_groups">Synchronizacja początkowa:
\nImportowanie Społeczności</string>
<string name="initial_sync_start_importing_account_data">Synchronizacja początkowa:
\nImportowanie danych Konta</string>

<string name="event_status_sending_message">Wysyłanie wiadomości…</string>
<string name="clear_timeline_send_queue">Wyczyść kolejkę wysyłania</string>

</resources>

View File

@ -78,10 +78,4 @@
<string name="room_displayname_empty_room">Sala vazia</string>


<string name="summary_user_sent_sticker">%1$s enviou um sticker.</string>

<string name="notice_room_update">%s fez o upgrade da sala.</string>

<string name="notice_event_redacted">Mensagem removida</string>
<string name="notice_event_redacted_by">Mensagem removida por %1$s</string>
</resources>

View File

@ -169,9 +169,9 @@
\nИмпорт криптографии</string>
<string name="initial_sync_start_importing_account_rooms">Начальная синхронизация:
\nИмпорт комнат</string>
<string name="initial_sync_start_importing_account_joined_rooms">Синхронизация начата:
<string name="initial_sync_start_importing_account_joined_rooms">Начальная синхронизация:
\nИмпорт присоединенных комнат</string>
<string name="initial_sync_start_importing_account_invited_rooms">Синхронизация начата:
<string name="initial_sync_start_importing_account_invited_rooms">Начальная синхронизация:
\nИмпорт приглашенных комнат</string>
<string name="initial_sync_start_importing_account_left_rooms">Начальная синхронизация:
\nИмпорт покинутых комнат</string>
@ -180,9 +180,4 @@
<string name="initial_sync_start_importing_account_data">Начальная синхронизация:
\nИмпорт данных учетной записи</string>

<string name="notice_room_update">%s обновил эту комнату.</string>

<string name="event_status_sending_message">Отправка сообщения…</string>
<string name="clear_timeline_send_queue">Очистить очередь отправки</string>

</resources>

View File

@ -82,95 +82,4 @@
</plurals>


<string name="notice_room_update">%s aktualizoval túto miestnosť.</string>

<string name="notice_event_redacted">Správa odstránená</string>
<string name="notice_event_redacted_by">Správa odstránená používateľom %1$s</string>
<string name="notice_event_redacted_with_reason">Správa odstránená [dôvod: %1$s]</string>
<string name="notice_event_redacted_by_with_reason">Správa odstránená používateľom %1$s [dôvod: %2$s]</string>
<string name="verification_emoji_dog">Pes</string>
<string name="verification_emoji_cat">Mačka</string>
<string name="verification_emoji_lion">Lev</string>
<string name="verification_emoji_horse">Kôň</string>
<string name="verification_emoji_unicorn">Jednorožec</string>
<string name="verification_emoji_pig">Prasa</string>
<string name="verification_emoji_elephant">Slon</string>
<string name="verification_emoji_rabbit">Zajac</string>
<string name="verification_emoji_panda">Panda</string>
<string name="verification_emoji_rooster">Kohút</string>
<string name="verification_emoji_penguin">Tučniak</string>
<string name="verification_emoji_turtle">Korytnačka</string>
<string name="verification_emoji_fish">Ryba</string>
<string name="verification_emoji_octopus">Chobotnica</string>
<string name="verification_emoji_butterfly">Motýľ</string>
<string name="verification_emoji_flower">Kvetina</string>
<string name="verification_emoji_tree">Strom</string>
<string name="verification_emoji_cactus">Kaktus</string>
<string name="verification_emoji_mushroom">Hríb</string>
<string name="verification_emoji_globe">Zemeguľa</string>
<string name="verification_emoji_moon">Mesiac</string>
<string name="verification_emoji_cloud">Oblak</string>
<string name="verification_emoji_fire">Oheň</string>
<string name="verification_emoji_banana">Banán</string>
<string name="verification_emoji_apple">Jablko</string>
<string name="verification_emoji_strawberry">Jahoda</string>
<string name="verification_emoji_corn">Kukurica</string>
<string name="verification_emoji_pizza">Pizza</string>
<string name="verification_emoji_cake">Koláč</string>
<string name="verification_emoji_heart">Srdce</string>
<string name="verification_emoji_smiley">Úsmev</string>
<string name="verification_emoji_robot">Robot</string>
<string name="verification_emoji_hat">Klobúk</string>
<string name="verification_emoji_glasses">Okuliare</string>
<string name="verification_emoji_wrench">Skrutkovač</string>
<string name="verification_emoji_santa">Mikuláš</string>
<string name="verification_emoji_thumbsup">Palec nahor</string>
<string name="verification_emoji_umbrella">Dáždnik</string>
<string name="verification_emoji_hourglass">Presýpacie hodiny</string>
<string name="verification_emoji_clock">Hodiny</string>
<string name="verification_emoji_gift">Darček</string>
<string name="verification_emoji_lightbulb">Žiarovka</string>
<string name="verification_emoji_book">Kniha</string>
<string name="verification_emoji_pencil">Ceruzka</string>
<string name="verification_emoji_paperclip">Kancelárska sponka</string>
<string name="verification_emoji_scissors">Nožnice</string>
<string name="verification_emoji_lock">Zámok</string>
<string name="verification_emoji_key">Kľúč</string>
<string name="verification_emoji_hammer">Kladivo</string>
<string name="verification_emoji_telephone">Telefón</string>
<string name="verification_emoji_flag">Vlajka</string>
<string name="verification_emoji_train">Vlak</string>
<string name="verification_emoji_bicycle">Bicykel</string>
<string name="verification_emoji_airplane">Lietadlo</string>
<string name="verification_emoji_rocket">Raketa</string>
<string name="verification_emoji_trophy">Trofej</string>
<string name="verification_emoji_ball">Lopta</string>
<string name="verification_emoji_guitar">Gitara</string>
<string name="verification_emoji_trumpet">Trúbka</string>
<string name="verification_emoji_bell">Zvonček</string>
<string name="verification_emoji_anchor">Kotva</string>
<string name="verification_emoji_headphone">Schlúchadlá</string>
<string name="verification_emoji_folder">Priečinok</string>
<string name="verification_emoji_pin">Pin</string>

<string name="initial_sync_start_importing_account">Úvodná synchronizácia:
\nPrebieha import účtu…</string>
<string name="initial_sync_start_importing_account_crypto">Úvodná synchronizácia:
\nPrebieha import šifrovacích kľúčov</string>
<string name="initial_sync_start_importing_account_rooms">Úvodná synchronizácia:
\nPrebieha import miestností</string>
<string name="initial_sync_start_importing_account_joined_rooms">Úvodná synchronizácia:
\nPrebieha import miestností, do ktorých ste vstúpili</string>
<string name="initial_sync_start_importing_account_invited_rooms">Úvodná synchronizácia:
\nPrebieha import pozvánok</string>
<string name="initial_sync_start_importing_account_left_rooms">Úvodná synchronizácia:
\nPrebieha import opustených miestností</string>
<string name="initial_sync_start_importing_account_groups">Úvodná synchronizácia:
\nPrebieha import komunít</string>
<string name="initial_sync_start_importing_account_data">Úvodná synchronizácia:
\nPrebieha import údajov účtu</string>

<string name="event_status_sending_message">Odosielanie správy…</string>
<string name="clear_timeline_send_queue">Vymazať správy na odoslanie</string>

</resources>

View File

@ -146,26 +146,4 @@
<string name="verification_emoji_anchor">Spirancë</string>
<string name="verification_emoji_headphone">Kufje</string>
<string name="verification_emoji_folder">Dosje</string>
<string name="notice_room_update">%s e përmirësoi këtë dhomë.</string>

<string name="initial_sync_start_importing_account">Njëkohësimi Fillestar:
\nPo importohet llogaria…</string>
<string name="initial_sync_start_importing_account_crypto">Njëkohësimi Fillestar:
\nPo importohet kriptografi</string>
<string name="initial_sync_start_importing_account_rooms">Njëkohësimi Fillestar:
\nPo importohen Dhoma</string>
<string name="initial_sync_start_importing_account_joined_rooms">Njëkohësimi Fillestar:
\nPo importohen Dhoma Ku Është Bërë Hyrje</string>
<string name="initial_sync_start_importing_account_invited_rooms">Njëkohësimi Fillestar:
\nPo importohen Dhoma Me Ftesë</string>
<string name="initial_sync_start_importing_account_left_rooms">Njëkohësimi Fillestar:
\nPo importohen Dhoma të Braktisura</string>
<string name="initial_sync_start_importing_account_groups">Njëkohësimi Fillestar:
\nPo importohen Bashkësi</string>
<string name="initial_sync_start_importing_account_data">Njëkohësimi Fillestar:
\nPo importohet të Dhëna Llogarie</string>

<string name="event_status_sending_message">Po dërgohet mesazh…</string>
<string name="clear_timeline_send_queue">Spastro radhë pritjeje</string>

</resources>

View File

@ -48,7 +48,7 @@
<string name="notice_room_third_party_registered_invite">%1$s èt duutnodigienge vo %2$s anveird</string>

<string name="notice_crypto_unable_to_decrypt">** Kun nie ountsleuteln: %s **</string>
<string name="notice_crypto_error_unkwown_inbound_session_id">t Toestel van den afzender èt geen sleutels vo da bericht hier gesteurd.</string>
<string name="notice_crypto_error_unkwown_inbound_session_id">t Toestel van den afzender èt geen sleutels vo dit bericht gesteurd.</string>

<string name="message_reply_to_prefix">Als antwoord ip</string>

@ -150,26 +150,21 @@
<string name="verification_emoji_folder">Mappe</string>
<string name="verification_emoji_pin">Pinne</string>

<string name="initial_sync_start_importing_account">Initiële synchronisoasje:
<string name="initial_sync_start_importing_account">Initiële synchronisoatie:
\nAccount wor geïmporteerd…</string>
<string name="initial_sync_start_importing_account_crypto">Initiële synchronisoasje:
<string name="initial_sync_start_importing_account_crypto">Initiële synchronisoatie:
\nCrypto wor geïmporteerd</string>
<string name="initial_sync_start_importing_account_rooms">Initiële synchronisoasje:
<string name="initial_sync_start_importing_account_rooms">Initiële synchronisoatie:
\nGesprekkn wordn geïmporteerd</string>
<string name="initial_sync_start_importing_account_joined_rooms">Initiële synchronisoasje:
<string name="initial_sync_start_importing_account_joined_rooms">Initiële synchronisoatie:
\nDeelgenoomn gesprekken wordn geïmporteerd</string>
<string name="initial_sync_start_importing_account_invited_rooms">Initiële synchronisoasje:
<string name="initial_sync_start_importing_account_invited_rooms">Initiële synchronisoatie:
\nUutgenodigde gesprekkn wordn geïmporteerd</string>
<string name="initial_sync_start_importing_account_left_rooms">Initiële synchronisoasje:
<string name="initial_sync_start_importing_account_left_rooms">Initiële synchronisoatie:
\nVerloatn gesprekkn wordn geïmporteerd</string>
<string name="initial_sync_start_importing_account_groups">Initiële synchronisoasje:
<string name="initial_sync_start_importing_account_groups">Initiële synchronisoatie:
\nGemeenschappn wordn geïmporteerd</string>
<string name="initial_sync_start_importing_account_data">Initiële synchronisoasje:
<string name="initial_sync_start_importing_account_data">Initiële synchronisoatie:
\nAccountgegeevns wordn geïmporteerd</string>

<string name="notice_room_update">%s èt da gesprek hier ipgewoardeerd.</string>

<string name="event_status_sending_message">Bericht wor verstuurd…</string>
<string name="clear_timeline_send_queue">Uutgoande wachtreeke leegn</string>

</resources>

View File

@ -162,9 +162,4 @@
<string name="initial_sync_start_importing_account_data">初始化同步:
\n正在导入账号数据</string>

<string name="notice_room_update">%s 升级了聊天室。</string>

<string name="event_status_sending_message">正在发送消息…</string>
<string name="clear_timeline_send_queue">清除正在发送队列</string>

</resources>

View File

@ -165,9 +165,4 @@
<string name="initial_sync_start_importing_account_data">初始化同步:
\n正在匯入帳號資料</string>

<string name="notice_room_update">%s 已升級此聊天室。</string>

<string name="event_status_sending_message">正在傳送訊息……</string>
<string name="clear_timeline_send_queue">清除傳送佇列</string>

</resources>

View File

@ -15,7 +15,7 @@ androidExtensions {
}

ext.versionMajor = 0
ext.versionMinor = 5
ext.versionMinor = 3
ext.versionPatch = 0

static def getGitTimestamp() {
@ -51,7 +51,7 @@ static def gitRevisionDate() {
}

static def gitBranchName() {
def cmd = "git rev-parse --abbrev-ref HEAD"
def cmd = "git name-rev --name-only HEAD"
return cmd.execute().text.trim()
}


View File

@ -1,67 +0,0 @@
/*
* Copyright 2019 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package im.vector.riotx

import android.content.Context
import androidx.appcompat.app.AppCompatActivity
import androidx.core.provider.FontRequest
import androidx.emoji.text.EmojiCompat
import androidx.emoji.text.FontRequestEmojiCompatConfig
import timber.log.Timber
import javax.inject.Inject
import javax.inject.Singleton

@Singleton
class EmojiCompatWrapper @Inject constructor(private val context: Context) {

private var initialized = false

fun init(fontRequest: FontRequest) {

//Use emoji compat for the benefit of emoji spans
val config = FontRequestEmojiCompatConfig(context, fontRequest)
// we want to replace all emojis with selected font
.setReplaceAll(true)
//Debug options
// .setEmojiSpanIndicatorEnabled(true)
// .setEmojiSpanIndicatorColor(Color.GREEN)
EmojiCompat.init(config)
.registerInitCallback(object : EmojiCompat.InitCallback() {
override fun onInitialized() {
Timber.v("Emoji compat onInitialized success ")
initialized = true
}

override fun onFailed(throwable: Throwable?) {
Timber.e(throwable, "Failed to init EmojiCompat")
}
})
}

fun safeEmojiSpanify(sequence: CharSequence): CharSequence {
if (initialized) {
try {
return EmojiCompat.get().process(sequence)
} catch (throwable: Throwable) {
//Defensive coding against error (should not happend as it is initialized)
Timber.e(throwable, "Failed to init EmojiCompat")
return sequence
}
} else {
return sequence
}
}
}

View File

@ -19,10 +19,13 @@ package im.vector.riotx
import android.app.Application
import android.content.Context
import android.content.res.Configuration
import android.graphics.Color
import android.os.Handler
import android.os.HandlerThread
import androidx.core.provider.FontRequest
import androidx.core.provider.FontsContractCompat
import androidx.emoji.text.EmojiCompat
import androidx.emoji.text.FontRequestEmojiCompatConfig
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleObserver
import androidx.lifecycle.OnLifecycleEvent
@ -66,7 +69,6 @@ class VectorApplication : Application(), HasVectorInjector, MatrixConfiguration.
@Inject lateinit var authenticator: Authenticator
@Inject lateinit var vectorConfiguration: VectorConfiguration
@Inject lateinit var emojiCompatFontProvider: EmojiCompatFontProvider
@Inject lateinit var emojiCompatWrapper: EmojiCompatWrapper
@Inject lateinit var vectorUncaughtExceptionHandler: VectorUncaughtExceptionHandler
@Inject lateinit var activeSessionHolder: ActiveSessionHolder
@Inject lateinit var notificationDrawerManager: NotificationDrawerManager
@ -86,12 +88,9 @@ class VectorApplication : Application(), HasVectorInjector, MatrixConfiguration.
vectorComponent = DaggerVectorComponent.factory().create(this)
vectorComponent.inject(this)
vectorUncaughtExceptionHandler.activate(this)

if (BuildConfig.DEBUG) {
Timber.plant(Timber.DebugTree())
}
Timber.plant(vectorComponent.vectorFileLogger())

// Log
VectorFileLogger.init(this)
Timber.plant(Timber.DebugTree(), VectorFileLogger)
if (BuildConfig.DEBUG) {
Stetho.initializeWithDefaults(this)
}
@ -110,7 +109,21 @@ class VectorApplication : Application(), HasVectorInjector, MatrixConfiguration.
FontsContractCompat.requestFont(this, fontRequest, emojiCompatFontProvider, getFontThreadHandler())
vectorConfiguration.initConfiguration()

emojiCompatWrapper.init(fontRequest)
//Use emoji compat for the benefit of emoji spans
val config = FontRequestEmojiCompatConfig(this, fontRequest)
.setReplaceAll(true) // we want to replace all emojis with selected font
// .setEmojiSpanIndicatorEnabled(true)
// .setEmojiSpanIndicatorColor(Color.GREEN)
EmojiCompat.init(config)
.registerInitCallback(object : EmojiCompat.InitCallback() {
override fun onInitialized() {
Timber.v("Emoji compat onInitialized success ")
}

override fun onFailed(throwable: Throwable?) {
Timber.e(throwable,"Failed to init EmojiCompat")
}
})

NotificationUtils.createNotificationChannels(applicationContext)
if (authenticator.hasAuthenticatedSessions() && !activeSessionHolder.hasActiveSession()) {

View File

@ -58,7 +58,6 @@ import im.vector.riotx.features.rageshake.BugReportActivity
import im.vector.riotx.features.rageshake.BugReporter
import im.vector.riotx.features.rageshake.RageShake
import im.vector.riotx.features.reactions.EmojiReactionPickerActivity
import im.vector.riotx.features.reactions.widget.ReactionButton
import im.vector.riotx.features.roomdirectory.PublicRoomsFragment
import im.vector.riotx.features.roomdirectory.RoomDirectoryActivity
import im.vector.riotx.features.roomdirectory.createroom.CreateRoomActivity
@ -182,8 +181,6 @@ interface ScreenComponent {

fun inject(displayReadReceiptsBottomSheet: DisplayReadReceiptsBottomSheet)

fun inject(reactionButton: ReactionButton)

@Component.Factory
interface Factory {
fun create(vectorComponent: VectorComponent,

View File

@ -24,7 +24,6 @@ import im.vector.matrix.android.api.Matrix
import im.vector.matrix.android.api.auth.Authenticator
import im.vector.matrix.android.api.session.Session
import im.vector.riotx.EmojiCompatFontProvider
import im.vector.riotx.EmojiCompatWrapper
import im.vector.riotx.VectorApplication
import im.vector.riotx.core.pushers.PushersManager
import im.vector.riotx.features.configuration.VectorConfiguration
@ -41,7 +40,6 @@ import im.vector.riotx.features.notifications.NotificationBroadcastReceiver
import im.vector.riotx.features.notifications.NotificationDrawerManager
import im.vector.riotx.features.notifications.PushRuleTriggerListener
import im.vector.riotx.features.rageshake.BugReporter
import im.vector.riotx.features.rageshake.VectorFileLogger
import im.vector.riotx.features.rageshake.VectorUncaughtExceptionHandler
import im.vector.riotx.features.settings.VectorPreferences
import javax.inject.Singleton
@ -72,8 +70,6 @@ interface VectorComponent {

fun emojiCompatFontProvider(): EmojiCompatFontProvider

fun emojiCompatWrapper() : EmojiCompatWrapper

fun eventHtmlRenderer(): EventHtmlRenderer

fun navigator(): Navigator
@ -102,8 +98,6 @@ interface VectorComponent {

fun vectorPreferences(): VectorPreferences

fun vectorFileLogger(): VectorFileLogger

@Component.Factory
interface Factory {
fun create(@BindsInstance context: Context): VectorComponent

View File

@ -21,8 +21,11 @@ import android.util.AttributeSet
import android.view.View
import android.widget.ImageView
import android.widget.LinearLayout
import androidx.core.view.isInvisible
import androidx.core.view.isVisible
import butterknife.ButterKnife
import im.vector.riotx.R
import im.vector.riotx.core.utils.DebouncedClickListener
import im.vector.riotx.features.home.AvatarRenderer
import im.vector.riotx.features.home.room.detail.timeline.item.ReadReceiptData
import kotlinx.android.synthetic.main.view_read_receipts.view.*
@ -45,6 +48,7 @@ class ReadReceiptsView @JvmOverloads constructor(

private fun setupView() {
inflate(context, R.layout.view_read_receipts, this)
ButterKnife.bind(this)
}

fun render(readReceipts: List<ReadReceiptData>, avatarRenderer: AvatarRenderer, clickListener: OnClickListener) {

View File

@ -26,6 +26,7 @@ import androidx.appcompat.widget.Toolbar
import androidx.core.view.GravityCompat
import androidx.core.view.isVisible
import androidx.drawerlayout.widget.DrawerLayout
import androidx.fragment.app.FragmentManager
import androidx.lifecycle.Observer
import androidx.lifecycle.ViewModelProviders
import com.airbnb.mvrx.viewModel
@ -35,10 +36,12 @@ import im.vector.riotx.core.di.ScreenComponent
import im.vector.riotx.core.extensions.hideKeyboard
import im.vector.riotx.core.extensions.observeEvent
import im.vector.riotx.core.extensions.replaceFragment
import im.vector.riotx.core.platform.OnBackPressed
import im.vector.riotx.core.platform.ToolbarConfigurable
import im.vector.riotx.core.platform.VectorBaseActivity
import im.vector.riotx.core.pushers.PushersManager
import im.vector.riotx.features.disclaimer.showDisclaimerDialog
import im.vector.riotx.features.navigation.Navigator
import im.vector.riotx.features.notifications.NotificationDrawerManager
import im.vector.riotx.features.rageshake.VectorUncaughtExceptionHandler
import im.vector.riotx.features.workers.signout.SignOutViewModel
@ -116,22 +119,22 @@ class HomeActivity : VectorBaseActivity(), ToolbarConfigurable {
intent.removeExtra(EXTRA_CLEAR_EXISTING_NOTIFICATION)
}

activeSessionHolder.getSafeActiveSession()?.getInitialSyncProgressStatus()?.observe(this, Observer { status ->
if (status == null) {
activeSessionHolder.getSafeActiveSession()?.getLiveStatus()?.observe(this, Observer { sprogress ->
Timber.e("${sprogress?.statusText?.let { getString(it) }} ${sprogress?.percentProgress}")
if (sprogress == null) {
waiting_view.isVisible = false
} else {
Timber.e("${getString(status.statusText)} ${status.percentProgress}")
waiting_view.setOnClickListener {
//block interactions
}
waiting_view_status_horizontal_progress.apply {
isIndeterminate = false
max = 100
progress = status.percentProgress
progress = sprogress.percentProgress
isVisible = true
}
waiting_view_status_text.apply {
text = getString(status.statusText)
text = sprogress.statusText?.let { getString(it) }
isVisible = true
}
waiting_view.isVisible = true
@ -210,6 +213,8 @@ class HomeActivity : VectorBaseActivity(), ToolbarConfigurable {
}




companion object {
private const val EXTRA_CLEAR_EXISTING_NOTIFICATION = "EXTRA_CLEAR_EXISTING_NOTIFICATION"


View File

@ -658,7 +658,7 @@ class RoomDetailViewModel @AssistedInject constructor(@Assisted initialState: Ro
private fun observeSummaryState() {
asyncSubscribe(RoomDetailViewState::asyncRoomSummary) { summary ->
if (summary.membership == Membership.INVITE) {
summary.latestEvent?.root?.senderId?.let { senderId ->
summary.latestPreviewableEvent?.root?.senderId?.let { senderId ->
session.getUser(senderId)
}?.also {
setState { copy(asyncInviter = Success(it)) }

View File

@ -46,7 +46,9 @@ class ViewReactionBottomSheet : VectorBaseBottomSheetDialogFragment() {
@BindView(R.id.bottom_sheet_display_reactions_list)
lateinit var epoxyRecyclerView: EpoxyRecyclerView

@Inject lateinit var epoxyController: ViewReactionsEpoxyController
private val epoxyController by lazy {
ViewReactionsEpoxyController(requireContext())
}

override fun injectWith(screenComponent: ScreenComponent) {
screenComponent.inject(this)

View File

@ -17,23 +17,21 @@
package im.vector.riotx.features.home.room.detail.timeline.action

import android.content.Context
import android.graphics.Typeface
import android.text.format.DateUtils
import androidx.emoji.text.EmojiCompat
import com.airbnb.epoxy.TypedEpoxyController
import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.Incomplete
import com.airbnb.mvrx.Success
import im.vector.riotx.EmojiCompatWrapper
import im.vector.riotx.R
import im.vector.riotx.core.resources.StringProvider
import im.vector.riotx.core.ui.list.genericFooterItem
import im.vector.riotx.core.ui.list.genericLoaderItem
import javax.inject.Inject

/**
* Epoxy controller for reaction event list
*/
class ViewReactionsEpoxyController @Inject constructor(
private val stringProvider: StringProvider,
private val emojiCompatWrapper: EmojiCompatWrapper )
class ViewReactionsEpoxyController(private val context: Context)
: TypedEpoxyController<DisplayReactionsViewState>() {

override fun buildModels(state: DisplayReactionsViewState) {
@ -46,7 +44,7 @@ class ViewReactionsEpoxyController @Inject constructor(
is Fail -> {
genericFooterItem {
id("failure")
text(stringProvider.getString(R.string.unknown_error))
text(context.getString(R.string.unknown_error))
}
}
is Success -> {
@ -54,7 +52,7 @@ class ViewReactionsEpoxyController @Inject constructor(
reactionInfoSimpleItem {
id(it.eventId)
timeStamp(it.timestamp)
reactionKey(emojiCompatWrapper.safeEmojiSpanify(it.reactionKey))
reactionKey(EmojiCompat.get().process(it.reactionKey))
authorDisplayName(it.authorName ?: it.authorId)
}
}

View File

@ -17,35 +17,21 @@
package im.vector.riotx.features.home.room.detail.timeline.factory

import im.vector.matrix.android.api.session.room.timeline.TimelineEvent
import im.vector.riotx.features.home.AvatarRenderer
import im.vector.riotx.features.home.room.detail.timeline.TimelineEventController
import im.vector.riotx.features.home.room.detail.timeline.item.DefaultItem
import im.vector.riotx.features.home.room.detail.timeline.item.DefaultItem_
import im.vector.riotx.features.home.room.detail.timeline.util.MessageInformationDataFactory
import javax.inject.Inject

class DefaultItemFactory @Inject constructor(private val avatarRenderer: AvatarRenderer,
private val informationDataFactory: MessageInformationDataFactory) {
class DefaultItemFactory @Inject constructor(){

fun create(event: TimelineEvent,
highlight: Boolean,
callback: TimelineEventController.Callback?,
exception: Exception? = null): DefaultItem? {
fun create(event: TimelineEvent, highlight: Boolean, exception: Exception? = null): DefaultItem? {
val text = if (exception == null) {
"${event.root.getClearType()} events are not yet handled"
} else {
"an exception occurred when rendering the event ${event.root.eventId}"
}

val informationData = informationDataFactory.create(event, null)

return DefaultItem_()
.text(text)
.avatarRenderer(avatarRenderer)
.highlighted(highlight)
.informationData(informationData)
.baseCallback(callback)
.readReceiptsCallback(callback)
}

}

View File

@ -28,7 +28,15 @@ import im.vector.matrix.android.api.permalinks.MatrixLinkify
import im.vector.matrix.android.api.permalinks.MatrixPermalinkSpan
import im.vector.matrix.android.api.session.events.model.RelationType
import im.vector.matrix.android.api.session.events.model.toModel
import im.vector.matrix.android.api.session.room.model.message.*
import im.vector.matrix.android.api.session.room.model.message.MessageAudioContent
import im.vector.matrix.android.api.session.room.model.message.MessageContent
import im.vector.matrix.android.api.session.room.model.message.MessageEmoteContent
import im.vector.matrix.android.api.session.room.model.message.MessageFileContent
import im.vector.matrix.android.api.session.room.model.message.MessageImageContent
import im.vector.matrix.android.api.session.room.model.message.MessageNoticeContent
import im.vector.matrix.android.api.session.room.model.message.MessageTextContent
import im.vector.matrix.android.api.session.room.model.message.MessageVideoContent
import im.vector.matrix.android.api.session.room.model.message.getFileUrl
import im.vector.matrix.android.api.session.room.timeline.TimelineEvent
import im.vector.matrix.android.api.session.room.timeline.getLastMessageContent
import im.vector.matrix.android.internal.crypto.attachments.toElementToDecrypt
@ -39,12 +47,26 @@ import im.vector.riotx.core.epoxy.VectorEpoxyModel
import im.vector.riotx.core.linkify.VectorLinkify
import im.vector.riotx.core.resources.ColorProvider
import im.vector.riotx.core.resources.StringProvider
import im.vector.riotx.core.resources.UserPreferencesProvider
import im.vector.riotx.core.utils.DebouncedClickListener
import im.vector.riotx.features.home.AvatarRenderer
import im.vector.riotx.features.home.room.detail.timeline.TimelineEventController
import im.vector.riotx.features.home.room.detail.timeline.helper.ContentUploadStateTrackerBinder
import im.vector.riotx.features.home.room.detail.timeline.helper.TimelineMediaSizeProvider
import im.vector.riotx.features.home.room.detail.timeline.item.*
import im.vector.riotx.features.home.room.detail.timeline.helper.senderAvatar
import im.vector.riotx.features.home.room.detail.timeline.item.BlankItem_
import im.vector.riotx.features.home.room.detail.timeline.item.DefaultItem
import im.vector.riotx.features.home.room.detail.timeline.item.DefaultItem_
import im.vector.riotx.features.home.room.detail.timeline.item.MessageFileItem
import im.vector.riotx.features.home.room.detail.timeline.item.MessageFileItem_
import im.vector.riotx.features.home.room.detail.timeline.item.MessageImageVideoItem
import im.vector.riotx.features.home.room.detail.timeline.item.MessageImageVideoItem_
import im.vector.riotx.features.home.room.detail.timeline.item.MessageInformationData
import im.vector.riotx.features.home.room.detail.timeline.item.MessageTextItem
import im.vector.riotx.features.home.room.detail.timeline.item.MessageTextItem_
import im.vector.riotx.features.home.room.detail.timeline.item.NoticeItem_
import im.vector.riotx.features.home.room.detail.timeline.item.RedactedMessageItem
import im.vector.riotx.features.home.room.detail.timeline.item.RedactedMessageItem_
import im.vector.riotx.features.home.room.detail.timeline.util.MessageInformationDataFactory
import im.vector.riotx.features.html.EventHtmlRenderer
import im.vector.riotx.features.media.ImageContentRenderer
@ -82,27 +104,31 @@ class MessageItemFactory @Inject constructor(
val messageContent: MessageContent =
event.getLastMessageContent()
?: //Malformed content, we should echo something on screen
return buildNotHandledMessageItem(stringProvider.getString(R.string.malformed_message),
informationData, highlight, callback)
return DefaultItem_().text(stringProvider.getString(R.string.malformed_message))

if (messageContent.relatesTo?.type == RelationType.REPLACE
|| event.isEncrypted() && event.root.content.toModel<EncryptedEventContent>()?.relatesTo?.type == RelationType.REPLACE
) {
// This is an edit event, we should display it when debugging as a notice event
// This is an edit event, we should it when debugging as a notice event
return noticeItemFactory.create(event, highlight, callback)
}
// val all = event.root.toContent()
// val ev = all.toModel<Event>()
return when (messageContent) {
is MessageEmoteContent -> buildEmoteMessageItem(messageContent, informationData, highlight, callback)
is MessageTextContent -> buildTextMessageItem(messageContent, informationData, highlight, callback)
is MessageEmoteContent -> buildEmoteMessageItem(messageContent,
informationData,
highlight,
callback)
is MessageTextContent -> buildTextMessageItem(messageContent,
informationData,
highlight,
callback)
is MessageImageContent -> buildImageMessageItem(messageContent, informationData, highlight, callback)
is MessageNoticeContent -> buildNoticeMessageItem(messageContent, informationData, highlight, callback)
is MessageVideoContent -> buildVideoMessageItem(messageContent, informationData, highlight, callback)
is MessageFileContent -> buildFileMessageItem(messageContent, informationData, highlight, callback)
is MessageAudioContent -> buildAudioMessageItem(messageContent, informationData, highlight, callback)
else -> buildNotHandledMessageItem("${messageContent.type} message events are not yet handled",
informationData, highlight, callback)
else -> buildNotHandledMessageItem(messageContent, highlight)
}
}

@ -164,17 +190,11 @@ class MessageItemFactory @Inject constructor(
}))
}

private fun buildNotHandledMessageItem(text: String,
informationData: MessageInformationData,
highlight: Boolean,
callback: TimelineEventController.Callback?): DefaultItem? {
private fun buildNotHandledMessageItem(messageContent: MessageContent, highlight: Boolean): DefaultItem? {
val text = "${messageContent.type} message events are not yet handled"
return DefaultItem_()
.text(text)
.avatarRenderer(avatarRenderer)
.highlighted(highlight)
.informationData(informationData)
.baseCallback(callback)
.readReceiptsCallback(callback)
}

private fun buildImageMessageItem(messageContent: MessageImageContent,

View File

@ -20,7 +20,12 @@ import im.vector.matrix.android.api.session.events.model.EventType
import im.vector.matrix.android.api.session.room.timeline.TimelineEvent
import im.vector.riotx.core.epoxy.EmptyItem_
import im.vector.riotx.core.epoxy.VectorEpoxyModel
import im.vector.riotx.features.home.AvatarRenderer
import im.vector.riotx.features.home.room.detail.timeline.TimelineEventController
import im.vector.riotx.features.home.room.detail.timeline.helper.senderAvatar
import im.vector.riotx.features.home.room.detail.timeline.item.MessageInformationData
import im.vector.riotx.features.home.room.detail.timeline.item.NoticeItem_
import im.vector.riotx.features.home.room.detail.timeline.util.MessageInformationDataFactory
import timber.log.Timber
import javax.inject.Inject

@ -66,7 +71,7 @@ class TimelineItemFactory @Inject constructor(private val messageItemFactory: Me

// Unhandled event types (yet)
EventType.STATE_ROOM_THIRD_PARTY_INVITE,
EventType.STICKER -> defaultItemFactory.create(event, highlight, callback)
EventType.STICKER -> defaultItemFactory.create(event, highlight)
else -> {
Timber.v("Type ${event.root.getClearType()} not handled")
null
@ -74,7 +79,7 @@ class TimelineItemFactory @Inject constructor(private val messageItemFactory: Me
}
} catch (e: Exception) {
Timber.e(e, "failed to create message item")
defaultItemFactory.create(event, highlight, callback, e)
defaultItemFactory.create(event, highlight, e)
}
return (computedModel ?: EmptyItem_())
}

View File

@ -16,6 +16,7 @@

package im.vector.riotx.features.home.room.detail.timeline.format

import android.text.TextUtils
import im.vector.matrix.android.api.session.events.model.Event
import im.vector.matrix.android.api.session.events.model.EventType
import im.vector.matrix.android.api.session.events.model.toModel
@ -23,14 +24,12 @@ import im.vector.matrix.android.api.session.room.model.*
import im.vector.matrix.android.api.session.room.model.call.CallInviteContent
import im.vector.matrix.android.api.session.room.timeline.TimelineEvent
import im.vector.riotx.R
import im.vector.riotx.core.di.ActiveSessionHolder
import im.vector.riotx.core.resources.StringProvider
import im.vector.riotx.features.home.room.detail.timeline.helper.senderName
import timber.log.Timber
import javax.inject.Inject

class NoticeEventFormatter @Inject constructor(private val sessionHolder: ActiveSessionHolder,
private val stringProvider: StringProvider) {
class NoticeEventFormatter @Inject constructor(private val stringProvider: StringProvider) {

fun format(timelineEvent: TimelineEvent): CharSequence? {
return when (val type = timelineEvent.root.getClearType()) {
@ -75,10 +74,10 @@ class NoticeEventFormatter @Inject constructor(private val sessionHolder: Active

private fun formatRoomNameEvent(event: Event, senderName: String?): CharSequence? {
val content = event.getClearContent().toModel<RoomNameContent>() ?: return null
return if (content.name.isNullOrBlank()) {
stringProvider.getString(R.string.notice_room_name_removed, senderName)
} else {
return if (!TextUtils.isEmpty(content.name)) {
stringProvider.getString(R.string.notice_room_name_changed, senderName, content.name)
} else {
stringProvider.getString(R.string.notice_room_name_removed, senderName)
}
}

@ -96,7 +95,8 @@ class NoticeEventFormatter @Inject constructor(private val sessionHolder: Active
}

private fun formatRoomHistoryVisibilityEvent(event: Event, senderName: String?): CharSequence? {
val historyVisibility = event.getClearContent().toModel<RoomHistoryVisibilityContent>()?.historyVisibility ?: return null
val historyVisibility = event.getClearContent().toModel<RoomHistoryVisibilityContent>()?.historyVisibility
?: return null

val formattedVisibility = when (historyVisibility) {
RoomHistoryVisibility.SHARED -> stringProvider.getString(R.string.notice_room_visibility_shared)
@ -138,7 +138,7 @@ class NoticeEventFormatter @Inject constructor(private val sessionHolder: Active
private fun buildProfileNotice(event: Event, senderName: String?, eventContent: RoomMember?, prevEventContent: RoomMember?): String? {
val displayText = StringBuilder()
// Check display name has been changed
if (eventContent?.displayName != prevEventContent?.displayName) {
if (!TextUtils.equals(eventContent?.displayName, prevEventContent?.displayName)) {
val displayNameText = when {
prevEventContent?.displayName.isNullOrEmpty() ->
stringProvider.getString(R.string.notice_display_name_set, event.senderId, eventContent?.displayName)
@ -151,7 +151,7 @@ class NoticeEventFormatter @Inject constructor(private val sessionHolder: Active
displayText.append(displayNameText)
}
// Check whether the avatar has been changed
if (eventContent?.avatarUrl != prevEventContent?.avatarUrl) {
if (!TextUtils.equals(eventContent?.avatarUrl, prevEventContent?.avatarUrl)) {
val displayAvatarText = if (displayText.isNotEmpty()) {
displayText.append(" ")
stringProvider.getString(R.string.notice_avatar_changed_too)
@ -168,14 +168,13 @@ class NoticeEventFormatter @Inject constructor(private val sessionHolder: Active
val targetDisplayName = eventContent?.displayName ?: prevEventContent?.displayName ?: ""
return when {
Membership.INVITE == eventContent?.membership -> {
val selfUserId = sessionHolder.getSafeActiveSession()?.myUserId
// TODO get userId
val selfUserId = ""
when {
eventContent.thirdPartyInvite != null -> {
val userWhoHasAccepted = eventContent.thirdPartyInvite?.signed?.mxid ?: event.stateKey
eventContent.thirdPartyInvite != null ->
stringProvider.getString(R.string.notice_room_third_party_registered_invite,
userWhoHasAccepted, eventContent.thirdPartyInvite?.displayName)
}
event.stateKey == selfUserId ->
targetDisplayName, eventContent.thirdPartyInvite?.displayName)
TextUtils.equals(event.stateKey, selfUserId) ->
stringProvider.getString(R.string.notice_room_invite_you, senderDisplayName)
event.stateKey.isNullOrEmpty() ->
stringProvider.getString(R.string.notice_room_invite_no_invitee, senderDisplayName)
@ -187,7 +186,7 @@ class NoticeEventFormatter @Inject constructor(private val sessionHolder: Active
stringProvider.getString(R.string.notice_room_join, senderDisplayName)
Membership.LEAVE == eventContent?.membership ->
// 2 cases here: this member may have left voluntarily or they may have been "left" by someone else ie. kicked
return if (event.senderId == event.stateKey) {
return if (TextUtils.equals(event.senderId, event.stateKey)) {
if (prevEventContent?.membership == Membership.INVITE) {
stringProvider.getString(R.string.notice_room_reject, senderDisplayName)
} else {

View File

@ -32,6 +32,7 @@ import com.airbnb.epoxy.EpoxyAttribute
import im.vector.matrix.android.api.session.room.send.SendState
import im.vector.riotx.R
import im.vector.riotx.core.resources.ColorProvider
import im.vector.riotx.core.ui.views.ReadReceiptsView
import im.vector.riotx.core.utils.DebouncedClickListener
import im.vector.riotx.core.utils.DimensionUtils.dpToPx
import im.vector.riotx.features.home.AvatarRenderer
@ -180,6 +181,7 @@ abstract class AbsMessageItem<H : AbsMessageItem.Holder> : BaseEventItem<H>() {
val avatarImageView by bind<ImageView>(R.id.messageAvatarImageView)
val memberNameView by bind<TextView>(R.id.messageMemberNameView)
val timeView by bind<TextView>(R.id.messageTimeView)
val readReceiptsView by bind<ReadReceiptsView>(R.id.readReceiptsView)
var reactionWrapper: ViewGroup? = null
var reactionFlowHelper: Flow? = null
}

View File

@ -24,7 +24,6 @@ import im.vector.riotx.R
import im.vector.riotx.core.epoxy.VectorEpoxyHolder
import im.vector.riotx.core.epoxy.VectorEpoxyModel
import im.vector.riotx.core.platform.CheckableView
import im.vector.riotx.core.ui.views.ReadReceiptsView
import im.vector.riotx.core.utils.DimensionUtils.dpToPx

/**
@ -50,7 +49,6 @@ abstract class BaseEventItem<H : BaseEventItem.BaseHolder> : VectorEpoxyModel<H>
abstract class BaseHolder(@IdRes val stubId: Int) : VectorEpoxyHolder() {
val leftGuideline by bind<Guideline>(R.id.messageStartGuideline)
val checkableBackground by bind<CheckableView>(R.id.messageSelectedBackground)
val readReceiptsView by bind<ReadReceiptsView>(R.id.readReceiptsView)

override fun bindView(itemView: View) {
super.bindView(itemView)

View File

@ -16,46 +16,19 @@

package im.vector.riotx.features.home.room.detail.timeline.item

import android.view.View
import android.widget.TextView
import com.airbnb.epoxy.EpoxyAttribute
import com.airbnb.epoxy.EpoxyModelClass
import im.vector.riotx.R
import im.vector.riotx.core.utils.DebouncedClickListener
import im.vector.riotx.features.home.AvatarRenderer
import im.vector.riotx.features.home.room.detail.timeline.TimelineEventController

@EpoxyModelClass(layout = R.layout.item_timeline_event_base_noinfo)
abstract class DefaultItem : BaseEventItem<DefaultItem.Holder>() {

@EpoxyAttribute
lateinit var informationData: MessageInformationData

@EpoxyAttribute
lateinit var avatarRenderer: AvatarRenderer

@EpoxyAttribute
var baseCallback: TimelineEventController.BaseCallback? = null

private var longClickListener = View.OnLongClickListener {
return@OnLongClickListener baseCallback?.onEventLongClicked(informationData, null, it) == true
}

@EpoxyAttribute
var readReceiptsCallback: TimelineEventController.ReadReceiptsCallback? = null

private val _readReceiptsClickListener = DebouncedClickListener(View.OnClickListener {
readReceiptsCallback?.onReadReceiptsClicked(informationData.readReceipts)
})

@EpoxyAttribute
var text: CharSequence? = null

override fun bind(holder: Holder) {
holder.messageView.text = text

holder.view.setOnLongClickListener(longClickListener)
holder.readReceiptsView.render(informationData.readReceipts, avatarRenderer, _readReceiptsClickListener)
}

override fun getViewType() = STUB_ID

View File

@ -21,7 +21,6 @@ import android.view.ViewGroup
import android.widget.ImageView
import android.widget.TextView
import androidx.core.view.children
import androidx.core.view.isVisible
import im.vector.riotx.R
import im.vector.riotx.features.home.AvatarRenderer

@ -76,9 +75,6 @@ data class MergedHeaderItem(private val isCollapsed: Boolean,
holder.separatorView.visibility = View.VISIBLE
holder.expandView.setText(R.string.merged_events_collapse)
}

// No read receipt for this item
holder.readReceiptsView.isVisible = false
}

data class Data(

View File

@ -22,6 +22,7 @@ import android.widget.TextView
import com.airbnb.epoxy.EpoxyAttribute
import com.airbnb.epoxy.EpoxyModelClass
import im.vector.riotx.R
import im.vector.riotx.core.ui.views.ReadReceiptsView
import im.vector.riotx.core.utils.DebouncedClickListener
import im.vector.riotx.features.home.AvatarRenderer
import im.vector.riotx.features.home.room.detail.timeline.TimelineEventController
@ -71,6 +72,7 @@ abstract class NoticeItem : BaseEventItem<NoticeItem.Holder>() {
class Holder : BaseHolder(STUB_ID) {
val avatarImageView by bind<ImageView>(R.id.itemNoticeAvatarView)
val noticeTextView by bind<TextView>(R.id.itemNoticeTextView)
val readReceiptsView by bind<ReadReceiptsView>(R.id.readReceiptsView)
}

companion object {

View File

@ -25,14 +25,14 @@ class ChronologicalRoomComparator @Inject constructor() : Comparator<RoomSummary
var rightTimestamp = 0L
var leftTimestamp = 0L
if (null != leftRoomSummary) {
leftTimestamp = leftRoomSummary.latestEvent?.root?.originServerTs ?: 0
leftTimestamp = leftRoomSummary.latestPreviewableEvent?.root?.originServerTs ?: 0
}
if (null != rightRoomSummary) {
rightTimestamp = rightRoomSummary.latestEvent?.root?.originServerTs ?: 0
rightTimestamp = rightRoomSummary.latestPreviewableEvent?.root?.originServerTs ?: 0
}
return if (rightRoomSummary?.latestEvent?.root == null) {
return if (rightRoomSummary?.latestPreviewableEvent?.root == null) {
-1
} else if (leftRoomSummary?.latestEvent?.root == null) {
} else if (leftRoomSummary?.latestPreviewableEvent?.root == null) {
1
} else {
val deltaTimestamp = rightTimestamp - leftTimestamp

View File

@ -32,7 +32,7 @@ abstract class RoomCategoryItem : VectorEpoxyModel<RoomCategoryItem.Holder>() {

@EpoxyAttribute lateinit var title: CharSequence
@EpoxyAttribute var expanded: Boolean = false
@EpoxyAttribute var unreadCount: Int = 0
@EpoxyAttribute var unreadNotificationCount: Int = 0
@EpoxyAttribute var showHighlighted: Boolean = false
@EpoxyAttribute var listener: (() -> Unit)? = null

@ -42,7 +42,7 @@ abstract class RoomCategoryItem : VectorEpoxyModel<RoomCategoryItem.Holder>() {
val expandedArrowDrawable = ContextCompat.getDrawable(holder.rootView.context, expandedArrowDrawableRes)?.also {
DrawableCompat.setTint(it, tintColor)
}
holder.unreadCounterBadgeView.render(UnreadCounterBadgeView.State(unreadCount, showHighlighted))
holder.unreadCounterBadgeView.render(UnreadCounterBadgeView.State(unreadNotificationCount, showHighlighted))
holder.titleView.setCompoundDrawablesWithIntrinsicBounds(expandedArrowDrawable, null, null, null)
holder.titleView.text = title
holder.rootView.setOnClickListener { listener?.invoke() }

View File

@ -101,7 +101,7 @@ class RoomSummaryController @Inject constructor(private val stringProvider: Stri
id(titleRes)
title(stringProvider.getString(titleRes).toUpperCase())
expanded(isExpanded)
unreadCount(unreadCount)
unreadNotificationCount(unreadCount)
showHighlighted(showHighlighted)
listener {
mutateExpandedState()

View File

@ -16,9 +16,11 @@

package im.vector.riotx.features.home.room.list

import android.view.View
import android.view.ViewGroup
import android.widget.ImageView
import android.widget.TextView
import androidx.core.view.isVisible
import com.airbnb.epoxy.EpoxyAttribute
import com.airbnb.epoxy.EpoxyModelClass
import im.vector.riotx.R
@ -36,7 +38,8 @@ abstract class RoomSummaryItem : VectorEpoxyModel<RoomSummaryItem.Holder>() {
@EpoxyAttribute lateinit var lastFormattedEvent: CharSequence
@EpoxyAttribute lateinit var lastEventTime: CharSequence
@EpoxyAttribute var avatarUrl: String? = null
@EpoxyAttribute var unreadCount: Int = 0
@EpoxyAttribute var unreadNotificationCount: Int = 0
@EpoxyAttribute var hasUnreadMessage: Boolean = false
@EpoxyAttribute var showHighlighted: Boolean = false
@EpoxyAttribute var listener: (() -> Unit)? = null

@ -47,13 +50,15 @@ abstract class RoomSummaryItem : VectorEpoxyModel<RoomSummaryItem.Holder>() {
holder.titleView.text = roomName
holder.lastEventTimeView.text = lastEventTime
holder.lastEventView.text = lastFormattedEvent
holder.unreadCounterBadgeView.render(UnreadCounterBadgeView.State(unreadCount, showHighlighted))
holder.unreadCounterBadgeView.render(UnreadCounterBadgeView.State(unreadNotificationCount, showHighlighted))
holder.unreadIndentIndicator.isVisible = hasUnreadMessage
avatarRenderer.render(avatarUrl, roomId, roomName.toString(), holder.avatarImageView)
}

class Holder : VectorEpoxyHolder() {
val titleView by bind<TextView>(R.id.roomNameView)
val unreadCounterBadgeView by bind<UnreadCounterBadgeView>(R.id.roomUnreadCounterBadgeView)
val unreadIndentIndicator by bind<View>(R.id.roomUnreadIndicator)
val lastEventView by bind<TextView>(R.id.roomLastEventView)
val lastEventTimeView by bind<TextView>(R.id.roomLastEventTimeView)
val avatarImageView by bind<ImageView>(R.id.roomAvatarImageView)

View File

@ -16,6 +16,7 @@

package im.vector.riotx.features.home.room.list

import im.vector.matrix.android.api.session.Session
import im.vector.matrix.android.api.session.events.model.EventType
import im.vector.matrix.android.api.session.events.model.toModel
import im.vector.matrix.android.api.session.room.model.Membership
@ -38,7 +39,8 @@ class RoomSummaryItemFactory @Inject constructor(private val noticeEventFormatte
private val dateFormatter: VectorDateFormatter,
private val colorProvider: ColorProvider,
private val stringProvider: StringProvider,
private val avatarRenderer: AvatarRenderer) {
private val avatarRenderer: AvatarRenderer,
private val session: Session) {

fun create(roomSummary: RoomSummary,
joiningRoomsIds: Set<String>,
@ -59,9 +61,9 @@ class RoomSummaryItemFactory @Inject constructor(private val noticeEventFormatte
rejectingErrorRoomsIds: Set<String>,
listener: RoomSummaryController.Listener?): VectorEpoxyModel<*> {
val secondLine = if (roomSummary.isDirect) {
roomSummary.latestEvent?.root?.senderId
roomSummary.latestPreviewableEvent?.root?.senderId
} else {
roomSummary.latestEvent?.root?.senderId?.let {
roomSummary.latestPreviewableEvent?.root?.senderId?.let {
stringProvider.getString(R.string.invited_by, it)
}
}
@ -88,7 +90,7 @@ class RoomSummaryItemFactory @Inject constructor(private val noticeEventFormatte

var latestFormattedEvent: CharSequence = ""
var latestEventTime: CharSequence = ""
val latestEvent = roomSummary.latestEvent
val latestEvent = roomSummary.latestPreviewableEvent
if (latestEvent != null) {
val date = latestEvent.root.localDateTime()
val currentDate = DateProvider.currentLocalDateTime()
@ -131,7 +133,8 @@ class RoomSummaryItemFactory @Inject constructor(private val noticeEventFormatte
.roomName(roomSummary.displayName)
.avatarUrl(roomSummary.avatarUrl)
.showHighlighted(showHighlighted)
.unreadCount(unreadCount)
.unreadNotificationCount(unreadCount)
.hasUnreadMessage(roomSummary.hasUnreadMessages)
.listener { listener?.onRoomSelected(roomSummary) }
}


View File

@ -48,7 +48,7 @@ class PushRuleTriggerListener @Inject constructor(
//TODO
} else {
notifiableEvent.noisy = !notificationAction.soundName.isNullOrBlank()
Timber.v("New event to notify")
Timber.v("New event to notify $notifiableEvent tweaks:$notificationAction")
notificationDrawerManager.onNotifiableEventReceived(notifiableEvent)
}
} else {

View File

@ -52,8 +52,7 @@ import javax.inject.Singleton
*/
@Singleton
class BugReporter @Inject constructor(private val activeSessionHolder: ActiveSessionHolder,
private val versionProvider: VersionProvider,
private val vectorFileLogger : VectorFileLogger) {
private val versionProvider: VersionProvider) {
var inMultiWindowMode = false

companion object {
@ -163,7 +162,7 @@ class BugReporter @Inject constructor(private val activeSessionHolder: ActiveSes
val gzippedFiles = ArrayList<File>()

if (withDevicesLogs) {
val files = vectorFileLogger.getLogFiles()
val files = VectorFileLogger.getLogFiles()

for (f in files) {
if (!mIsCancelled) {
@ -349,20 +348,20 @@ class BugReporter @Inject constructor(private val activeSessionHolder: ActiveSes
} else if (null == response || null == response.body()) {
serverError = "Failed with error $responseCode"
} else {
var inputStream: InputStream? = null
var `is`: InputStream? = null

try {
inputStream = response.body()!!.byteStream()
`is` = response.body()!!.byteStream()

if (null != inputStream) {
var ch = inputStream.read()
if (null != `is`) {
var ch = `is`.read()
val b = StringBuilder()
while (ch != -1) {
b.append(ch.toChar())
ch = inputStream.read()
ch = `is`.read()
}
serverError = b.toString()
inputStream.close()
`is`.close()

// check if the error message
try {
@ -381,7 +380,7 @@ class BugReporter @Inject constructor(private val activeSessionHolder: ActiveSes
Timber.e(e, "## sendBugReport() : failed to parse error " + e.message)
} finally {
try {
inputStream?.close()
`is`?.close()
} catch (e: Exception) {
Timber.e(e, "## sendBugReport() : failed to close the error stream " + e.message)
}

View File

@ -17,74 +17,43 @@
package im.vector.riotx.features.rageshake

import android.content.Context
import android.util.Log
import im.vector.riotx.features.settings.VectorPreferences
import android.text.TextUtils
import timber.log.Timber
import java.io.File
import java.io.IOException
import java.io.PrintWriter
import java.io.StringWriter
import java.text.SimpleDateFormat
import java.util.*
import java.util.logging.*
import java.util.logging.Formatter
import javax.inject.Inject
import javax.inject.Singleton
import kotlin.collections.ArrayList

private const val LOG_SIZE_BYTES = 20 * 1024 * 1024 // 20MB
object VectorFileLogger : Timber.DebugTree() {

private const val LOG_ROTATION_COUNT = 3


@Singleton
class VectorFileLogger @Inject constructor(val context: Context, private val vectorPreferences: VectorPreferences) : Timber.DebugTree() {
private const val LOG_SIZE_BYTES = 50 * 1024 * 1024 // 50MB

// relatively large rotation count because closing > opening the app rotates the log (!)
private const val LOG_ROTATION_COUNT = 15

private val sLogger = Logger.getLogger("im.vector.riotx")
private var sFileHandler: FileHandler? = null
private var sCacheDirectory: File? = null
private var sFileName = "riotxlogs"
private lateinit var sFileHandler: FileHandler
private lateinit var sCacheDirectory: File
private var sFileName = "riotx"

private val prioPrefixes = mapOf(
Log.VERBOSE to "V/ ",
Log.DEBUG to "D/ ",
Log.INFO to "I/ ",
Log.WARN to "W/ ",
Log.ERROR to "E/ ",
Log.ASSERT to "WTF/ "
)

init {
fun init(context: Context) {
val logsDirectoryFile = context.cacheDir.absolutePath + "/logs"

setLogDirectory(File(logsDirectoryFile))
try {
if (sCacheDirectory != null) {
sFileHandler = FileHandler(sCacheDirectory!!.absolutePath + "/" + sFileName + ".%g.txt", LOG_SIZE_BYTES, LOG_ROTATION_COUNT)
sFileHandler?.formatter = LogFormatter()
sLogger.useParentHandlers = false
sLogger.level = Level.ALL
sLogger.addHandler(sFileHandler)
}
} catch (e: Throwable) {
Timber.e(e, "Failed to initialize FileLogger")
}
init("RiotXLog")
}

override fun log(priority: Int, tag: String?, message: String, t: Throwable?) {
if (sFileHandler == null) return
if (skipLog(priority)) return
if (t != null) {
logToFile(t)
}
logToFile(prioPrefixes[priority] ?: "$priority ", tag ?: "Tag", message)
}

private fun skipLog(priority: Int): Boolean {
return if (vectorPreferences.labAllowedExtendedLogging()) {
false
} else {
priority < Log.ERROR
}
logToFile("$priority ", tag ?: "Tag", message)
}

/**
@ -99,6 +68,24 @@ class VectorFileLogger @Inject constructor(val context: Context, private val vec
sCacheDirectory = cacheDir
}

/**
* Initialises the logger. Should be called AFTER [Log.setLogDirectory].
*
* @param fileName the base file name
*/
private fun init(fileName: String) {
try {
if (!TextUtils.isEmpty(fileName)) {
sFileName = fileName
}
sFileHandler = FileHandler(sCacheDirectory.absolutePath + "/" + sFileName + ".%g.txt", LOG_SIZE_BYTES, LOG_ROTATION_COUNT)
sFileHandler.formatter = LogFormatter()
sLogger.useParentHandlers = false
sLogger.level = Level.ALL
sLogger.addHandler(sFileHandler)
} catch (e: IOException) {
}
}

/**
* Adds our own log files to the provided list of files.
@ -112,8 +99,8 @@ class VectorFileLogger @Inject constructor(val context: Context, private val vec
try {
// reported by GA
if (null != sFileHandler) {
sFileHandler!!.flush()
val absPath = sCacheDirectory?.absolutePath ?: return emptyList()
sFileHandler.flush()
val absPath = sCacheDirectory.absolutePath

for (i in 0..LOG_ROTATION_COUNT) {
val filepath = "$absPath/$sFileName.$i.txt"
@ -124,7 +111,7 @@ class VectorFileLogger @Inject constructor(val context: Context, private val vec
}
}
} catch (e: Exception) {
Timber.e(e, "## addLogFiles() failed : %s", e.message)
Timber.e(e, "## addLogFiles() failed : " + e.message)
}

return files

View File

@ -21,6 +21,7 @@ import android.animation.AnimatorSet
import android.animation.ObjectAnimator
import android.content.Context
import android.content.res.TypedArray
import android.graphics.Typeface
import android.graphics.drawable.Drawable
import android.util.AttributeSet
import android.view.LayoutInflater
@ -34,11 +35,9 @@ import android.widget.TextView
import androidx.annotation.ColorInt
import androidx.annotation.ColorRes
import androidx.core.content.ContextCompat
import im.vector.riotx.EmojiCompatWrapper
import androidx.emoji.text.EmojiCompat
import im.vector.riotx.R
import im.vector.riotx.core.di.HasScreenInjector
import im.vector.riotx.core.utils.TextUtils
import javax.inject.Inject

/**
* An animated reaction button.
@ -48,12 +47,6 @@ class ReactionButton @JvmOverloads constructor(context: Context, attrs: Attribut
defStyleAttr: Int = 0)
: FrameLayout(context, attrs, defStyleAttr), View.OnClickListener, View.OnLongClickListener {

init {
if (context is HasScreenInjector) {
context.injector().inject(this)
}
}

companion object {
private val DECCELERATE_INTERPOLATOR = DecelerateInterpolator()
private val ACCELERATE_DECELERATE_INTERPOLATOR = AccelerateDecelerateInterpolator()
@ -61,8 +54,6 @@ class ReactionButton @JvmOverloads constructor(context: Context, attrs: Attribut

}

@Inject lateinit var emojiCompatWrapper: EmojiCompatWrapper

private var emojiView: TextView? = null
private var countTextView: TextView? = null

@ -87,7 +78,7 @@ class ReactionButton @JvmOverloads constructor(context: Context, attrs: Attribut
set(value) {
field = value
//maybe cache this for performances?
val emojiSpanned = emojiCompatWrapper.safeEmojiSpanify(value)
val emojiSpanned = EmojiCompat.get().process(value)
emojiView?.text = emojiSpanned
}


View File

@ -149,8 +149,6 @@ class VectorPreferences @Inject constructor(private val context: Context) {
private const val SETTINGS_USE_NATIVE_CAMERA_PREFERENCE_KEY = "SETTINGS_USE_NATIVE_CAMERA_PREFERENCE_KEY"
private const val SETTINGS_ENABLE_SEND_VOICE_FEATURE_PREFERENCE_KEY = "SETTINGS_ENABLE_SEND_VOICE_FEATURE_PREFERENCE_KEY"

const val SETTINGS_LABS_ALLOW_EXTENDED_LOGS = "SETTINGS_LABS_ALLOW_EXTENDED_LOGS"

private const val SETTINGS_LABS_SHOW_HIDDEN_EVENTS_PREFERENCE_KEY = "SETTINGS_LABS_SHOW_HIDDEN_EVENTS_PREFERENCE_KEY"
private const val SETTINGS_LABS_ENABLE_SWIPE_TO_REPLY = "SETTINGS_LABS_ENABLE_SWIPE_TO_REPLY"

@ -259,10 +257,6 @@ class VectorPreferences @Inject constructor(private val context: Context) {
return defaultPrefs.getBoolean(SETTINGS_LABS_ENABLE_SWIPE_TO_REPLY, true)
}

fun labAllowedExtendedLogging(): Boolean {
return defaultPrefs.getBoolean(SETTINGS_LABS_ALLOW_EXTENDED_LOGS, false)
}

/**
* Tells if we have already asked the user to disable battery optimisations on android >= M devices.
*

View File

@ -10,12 +10,22 @@
android:focusable="true"
android:foreground="?attr/selectableItemBackground">

<View
android:id="@+id/roomUnreadIndicator"
android:layout_width="4dp"
android:layout_height="0dp"
android:background="?attr/colorAccent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:visibility="gone"
tools:visibility="visible"/>

<ImageView
android:id="@+id/roomAvatarImageView"
android:layout_width="56dp"
android:layout_height="56dp"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginTop="12dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"

View File

@ -129,10 +129,8 @@
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginBottom="4dp"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
tools:visibility="visible" />
app:layout_constraintEnd_toEndOf="parent" />


</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -58,10 +58,8 @@
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginBottom="4dp"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
tools:visibility="visible" />
app:layout_constraintEnd_toEndOf="parent" />


</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -326,7 +326,7 @@
<string name="room_unsent_messages_notification">Съобщенията не са изпратени. %1$s или %2$s?</string>
<string name="room_unknown_devices_messages_notification">Съобщението не е изпратено поради наличието на непознати устройства. %1$s или %2$s?</string>
<string name="room_prompt_resend">Изпрати всички отново</string>
<string name="room_prompt_cancel">Откажи всички</string>
<string name="room_prompt_cancel">откажи всички</string>
<string name="room_resend_unsent_messages">Изпрати отново неизпратените съобщения</string>
<string name="room_delete_unsent_messages">Изтрий неизпратените съобщения</string>
<string name="room_message_file_not_found">Файлът не е намерен</string>
@ -1600,17 +1600,4 @@

<string name="link_copied_to_clipboard">Връзката беше копирана</string>

<string name="settings_integration_manager">Мениджър на интеграции</string>

<string name="integration_manager_not_configured">Не е конфигуриран мениджър на интеграции.</string>
<string name="add_by_matrix_id">Добави по Matrix идентификатор</string>
<string name="creating_direct_room">Създаване на стая…</string>
<string name="direct_room_no_known_users">Не са намерени резултати, използва \"Добави по Matrix идентификатор\" за търсене на сървъра.</string>
<string name="direct_room_start_search">Започнете да пишете, за да получите резултати</string>
<string name="direct_room_filter_hint">Филтрирай по потребител или ID…</string>

<string name="joining_room">Присъединяване в стая…</string>

<string name="message_view_edit_history">Виж историята на редакциите</string>

</resources>

View File

@ -12,7 +12,7 @@
<string name="black_them">Tema negre</string>

<!-- permanent notification subtitle -->
<string name="notification_sync_in_progress">S\'està sincronitzant…</string>
<string name="notification_sync_in_progress">Sincronitzant</string>
<string name="notification_listening_for_events">Escolta esdeveniments</string>
<string name="notification_noisy_notifications">Notificacions sorolloses</string>
<string name="notification_silent_notifications">Notificacions silencioses</string>
@ -46,10 +46,9 @@
<string name="rename">Reanomena</string>
<string name="report_content">Informa del contingut</string>
<string name="active_call">Trucada activa</string>
<string name="ongoing_conference_call">Conferència en curs.
\nUniu-vos hi per %1$s o %2$s.</string>
<string name="ongoing_conference_call_voice">Veu</string>
<string name="ongoing_conference_call_video">Vídeo</string>
<string name="ongoing_conference_call">" Conferència en curs.\nUniu-vos hi per %1$s o %2$s."</string>
<string name="ongoing_conference_call_voice">veu</string>
<string name="ongoing_conference_call_video">vídeo</string>
<string name="cannot_start_call">La trucada no es pot iniciar, prova-ho més tard</string>
<string name="missing_permissions_warning">Pot ser que algunes funcions no apareguin per manca de permisos…</string>
<string name="missing_permissions_to_start_conf_call">Es necessiten permisos per convidar a iniciar una conferència en aquesta sala</string>
@ -85,11 +84,11 @@
<string name="bottom_action_rooms">Sales</string>

<!-- Home screen -->
<string name="home_filter_placeholder_home">Filtrar noms de sales</string>
<string name="home_filter_placeholder_favorites">Filtrar preferits</string>
<string name="home_filter_placeholder_people">Filtrar persones</string>
<string name="home_filter_placeholder_rooms">Filtrar per noms de sala</string>
<string name="home_filter_placeholder_groups">Filtrar per nom de comunitats</string>
<string name="home_filter_placeholder_home">Cerca sales</string>
<string name="home_filter_placeholder_favorites">Cerca preferits</string>
<string name="home_filter_placeholder_people">Cerca persones</string>
<string name="home_filter_placeholder_rooms">Cerca sales</string>
<string name="home_filter_placeholder_groups">Cerca comunitats</string>

<!-- Home fragment -->
<string name="invitations_header">Convida</string>
@ -138,7 +137,7 @@

<string name="join_room">Uneix-te a la sala</string>
<string name="username">Nom d\'usuari</string>
<string name="create_account">Crear un compte</string>
<string name="create_account">Registra\'m</string>
<string name="login">Entra</string>
<string name="logout">Desconnecta</string>
<string name="hs_url">URL del servidor</string>
@ -236,7 +235,7 @@
<!-- accounts list Screen -->

<!-- image size selection -->
<string name="compression_options">Envia com</string>
<string name="compression_options">"Envia com "</string>
<string name="compression_opt_list_original">Original</string>
<string name="compression_opt_list_large">Gran</string>
<string name="compression_opt_list_medium">Mitjana</string>
@ -284,9 +283,7 @@
<string name="permissions_rationale_msg_record_audio">Per tal de fer trucades de veu, el Riot necessita permís d\'accés al microfon.</string>
<string name="permissions_rationale_msg_record_audio_explanation">\n\nA la següent finestra emergent, doneu permís d\'accés per tal de poder fer la trucada.</string>
<string name="permissions_rationale_msg_camera_and_audio">Per tal de fer vídeotrucades, el Riot necessita permís d\'accés a la càmera i al microfon.\n\nA la següent finestra emergent, doneu permís d\'accés per tal de poder fer la trucada.</string>
<string name="permissions_rationale_msg_contacts">Riot pot comprovar la vostra agenda de contactes per tal de trobar altres usuaris de Matrix basant-se en les seves adreces de correu i números de telèfon.
\n
\nSi accepteu compartir la vostra agenda de contactes amb aquesta finalitat, si us plau permeteu l\'accés de la següent finestra emergent.</string>
<string name="permissions_rationale_msg_contacts">Per tal de trobar altres usuaris de Matrix a partir dels seus correus electrònics o dels seus números de telefon, el Riot necessita permís d\'accés a l\'agenda de contactes.\n\nA la següent finestra emergent, doneu permís d\'accés per trobar amb quins contactes de la teva agenda pots contactar a partir de Riot.</string>
<string name="permissions_msg_contacts_warning_other_androids">Per tal de trobar altres usuaris de Matrix a partir dels seus correus electrònics o dels seus números de telefon, el Riot necessita permís d\'accés a l\'agenda de contactes.\n\nPermeteu que Riot accedeixi als vostres contactes?</string>

<string name="permissions_action_not_performed_missing_permissions">No s\'ha realitzat l\'acció per falta de permisos</string>
@ -373,7 +370,7 @@
<string name="room_unsent_messages_notification">Els missatges no s\'han enviat. %1$s o %2$s ara?</string>
<string name="room_unknown_devices_messages_notification">Els missatges no s\'han enviat perquè hi ha disposistius desconeguts. %1$s o %2$s ara?</string>
<string name="room_prompt_resend">Reenvia-ho tot</string>
<string name="room_prompt_cancel">Cancel·la-ho tot</string>
<string name="room_prompt_cancel">cancel·la-ho tot</string>
<string name="room_resend_unsent_messages">Reenvia els missatges no enviats</string>
<string name="room_delete_unsent_messages">Elimina els missatges no enviats</string>
<string name="room_message_file_not_found">No s\'ha trobat el fitxer</string>
@ -545,9 +542,9 @@ Tingueu en compte que aquesta acció reiniciarà l\'aplicació i que pot trigar
<string name="account_phone_number_already_used_error">Aquest número de telèfon ja està en ús.</string>

<string name="settings_change_password">Canvia la contrasenya</string>
<string name="settings_old_password">Contrasenya actual</string>
<string name="settings_old_password">Contrasenya antiga</string>
<string name="settings_new_password">Contrasenya nova</string>
<string name="settings_confirm_password">Confirmeu la nova contrasenya</string>
<string name="settings_confirm_password">Confirmeu la contrasenya</string>
<string name="settings_fail_to_update_password">No s\'ha pogut actualitzar la contrasenya</string>
<string name="settings_password_updated">La contrasenya s\'ha actualitzat</string>
<string name="settings_unignore_user">Mostra tots els missatges des de %s?
@ -892,7 +889,7 @@ Atenció: es podria eliminar aquest fitxer si es desinstal·la l\'aplicació.</s
<string name="e2e_re_request_encryption_key_dialog_content">Si us plau, engega Riot a un altre dispositiu que pugui desencriptar el missatge de manera que pugui enviar la clau a aquest dispositiu.</string>

<string name="settings_notification_privacy_normal">Normal</string>
<string name="status_theme">Tema Status.im</string>
<string name="status_theme">Motiu Status.im</string>

<string name="missing_permissions_error">Manquen permisos per a dur a terme aquesta acció.</string>
<string name="dialog_title_error">Error</string>
@ -927,7 +924,7 @@ En voleu afegir algun?</string>
<string name="room_participants_action_unignore_prompt">Mostrar tots els missatges d\'aquest usuari?

Tingueu en compte que aquesta acció reiniciarà l\'aplicació i pot trigar una estona.</string>
<string name="room_participants_invite_join_names">"%1$s,· "</string>
<string name="room_participants_invite_join_names">"%1$s, "</string>
<string name="room_participants_invite_join_names_and">%1$s i %2$s</string>
<string name="room_participants_invite_join_names_combined">%1$s %2$s</string>

@ -941,7 +938,7 @@ Tingueu en compte que aquesta acció reiniciarà l\'aplicació i pot trigar una
<string name="settings_notification_privacy">Notificació de privacitat</string>
<string name="settings_notification_privacy_reduced">Privacitat reduïda</string>
<string name="settings_notification_privacy_need_permission">L\'aplicació necessita permisos per funcionar en segon pla</string>
<string name="settings_notification_privacy_fcm">• Les notificacions s\'envien via Firebase Cloud Messaging</string>
<string name="settings_notification_privacy_fcm">• Les notificacions s\'envien via Google Cloud Messaging</string>
<string name="settings_notification_privacy_metadata">• Les notificacions contenen només meta dades</string>
<string name="settings_notification_privacy_secure_message_content">• El contingut dels missatges de les notificacions s\'obté <b>de forma segura des del servidor de Matrix</b></string>
<string name="settings_notification_privacy_nosecure_message_content">• Les notificacions contenen <b>meta dades i dades de missatges</b></string>
@ -1249,7 +1246,7 @@ Aquest error és fora del control del Riot. No hi ha cap compte de Google al tel
<string name="settings_troubleshoot_test_bg_restricted_failed">Les restriccions de rerefons són habilitades per al Riot.
Les tasques que l\'aplicació intenta fer estaran restringides agressivament mentre estigui al rerefons, i això pot afectar les notificacions.
%1$s</string>
<string name="settings_troubleshoot_test_battery_failed">Si un usuari deixa un dispositiu sense endollar i immòbil durant un període de temps, amb la pantalla apagada, el dispositiu entra en el mode d\'estalvi d\'energia. Això impedeix les aplicacions d\'accedir a la xarxa i ajorna les seves tasques, sincronitzacions i alarmes estàndard.</string>
<string name="settings_troubleshoot_test_battery_failed">"Si un usuari deixa un dispositiu sense endollar i immòbil durant un període de temps, amb la pantalla apagada, el dispositiu entra en el mode Doze. Això impedeix les aplicacions d\'accedir a la xarxa i ajorna les seves tasques, sincronitzacions i alarmes estàndard. "</string>
<string name="store_full_description">"Una aplicació de xat, sota el vostre control i totalment flexible. El Riot us permet comunicar-vos de la manera que preferiu. Fet per al [matrix] - lestàndard per a la comunicació oberta i descentralitzada.

Obteniu un compte gratuït de matrix.org, executeu el vostre servidor propi a https://modular.im, o empreu un altre servidor de Matrix.
@ -1388,7 +1385,7 @@ Per què triar Riot.im?
<string name="notification_sync_init">Inicialitzar servei</string>
<string name="ignore">Ignorar</string>

<string name="auth_login_sso">Iniciar sessió amb Single Sign-on</string>
<string name="auth_login_sso">Registrar-se amb Single Sign-on</string>
<string name="login_error_unknown_host">Aquesta URL no està disponible , si us plau verifiqueu-la</string>
<string name="login_error_ssl_handshake">El vostre dispositiu està usant una versió obsoleta del protocol de seguretat TLS, vulnerable a atacs. Per a la vostra seguretat no us podreu connectar</string>
<string name="settings_send_message_with_enter">Envieu un missatge amb Enter</string>
@ -1406,174 +1403,4 @@ Per què triar Riot.im?
<string name="autodiscover_invalid_response">Resposta no vàlida en descobrir homeservers</string>
<string name="autodiscover_well_known_autofill_confirm">Usar Config</string>

<string name="title_activity_verify_device">Verificar dispositiu</string>

<string name="action_mark_room_read">Marcar com a llegit</string>
<string name="settings_notification_privacy_no_background_sync">Les app <b>no</b> necessita connectar-se al HomeServer en segon pla, hauria de reduir el consum de bateria</string>
<string name="settings_integration_manager">Administrador d\'integracions</string>

<string name="settings_play_shutter_sound">Reproduir el so de disparador</string>

<string name="encryption_information_unknown_ip">IP desconeguda</string>
<plurals name="notification_compat_summary_line_for_room">
<item quantity="one">%1$s: 1 missatge</item>
<item quantity="other">%1$s: %2$d missatges</item>
</plurals>
<plurals name="notification_compat_summary_title">
<item quantity="one">%d notificacion</item>
<item quantity="other">%d notificacions</item>
</plurals>

<string name="notification_unknown_new_event">Nou esdeveniment</string>
<string name="notification_unknown_room_name">Sala</string>
<string name="notification_new_messages">Missatges nous</string>
<string name="notification_new_invitation">Nova invitació</string>
<string name="notification_sender_me">Jo</string>
<string name="notification_inline_reply_failed">** Error en enviar - Si us plau obriu la sala</string>

<string name="error_jitsi_not_supported_on_old_device">Ho sentim, els dispositius amb SO Android inferior a 5.0 no suporten trucades multi-usuari amb Jitsi</string>

<string name="integration_manager_not_configured">No heu configurat cap administrador d\'integracions.</string>
<string name="you_added_a_new_device_with_info">Un nou dispositiu està sol·licitant claus d\'encriptació.
\nNom del dispositiu: %1$s
\nVist per última vegada: %s$s
\nSi no heu iniciat sessió en un altre dispositiu, ignoreu la sol·licitud.</string>
<string name="your_unverified_device_requesting_with_info">Un dispositiu no verificat està sol·licitant claus d\'encriptació.
\nNom del dispositiu: %1$s
\nVist per última vegada: %s$s
\nSi no heu iniciat sessió en un altre dispositiu, ignoreu la sol·licitud.</string>

<string name="start_verification_short_label">Verificar</string>
<string name="share_without_verifying_short_label">Compartir</string>
<string name="key_share_request">Sol·licitud de compartició de clau</string>
<string name="ignore_request_short_label">Ignorar</string>

<string name="keys_backup_setup_override_backup_prompt_tile">Ja existeix una còpia de seguretat al vostre HomeServer</string>
<string name="keys_backup_setup_override_backup_prompt_description">Sembla que ja heu configurat una còpia de seguretat de claus des d\'un altre dispositiu. Voleu reemplaçar-la amb la que esteu creant\?</string>
<string name="keys_backup_setup_override_replace">Reemplaçar</string>
<string name="keys_backup_setup_override_stop">Aturar</string>

<string name="keys_backup_settings_checking_backup_state">Comprovant l\'estat de la còpia de seguretat</string>
<string name="autodiscover_well_known_autofill_dialog_title">Opcions d\'autocompleció del servidor</string>
<string name="autodiscover_well_known_autofill_dialog_message">Riot ha detectat una configuració de servidor personalitzat pel domini del seu identificador d\'usuari \"%1$s\":
\n%2$s</string>
<string name="invalid_or_expired_credentials">Us heu desconnectat a causa de credencials incorrectes o caducades.</string>

<string name="sas_verify_title">Verificar comparant una cadena de text curta.</string>
<string name="sas_security_advise">Per la màxima seguretat us recomanem fer això en persona o usar un altre medi de comunicació confiable.</string>
<string name="sas_verify_start_button_title">Començar la verificació</string>
<string name="sas_incoming_request_title">Sol·licitud de verificació entrant</string>
<string name="sas_incoming_request_description">Verificar aquest dispositiu per marcar-lo com a confiable. Confiar en dispositius d\'amistats us dona un alleujament addicional quan useu missatges encriptats end-to-end.</string>
<string name="sas_incoming_request_description_2">Verificant aquest dispositiu el marcareu com a confiable, i també marcareu el vostre dispositiu com a confiable pel vostre company.</string>

<string name="sas_emoji_description">Verificar aquest dispositiu confirmant els següents emojis que apareguin a la pantalla del vostre company</string>
<string name="sas_decimal_description">Verificar aquest dispositiu confirmant els següents números que sortiran a la pantalla del vostre company</string>

<string name="sas_incoming_verification_request_dialog">Heu rebut una sol·licitud de verificació entrant.</string>
<string name="sas_view_request_action">Veure sol·licitud</string>
<string name="sas_waiting_for_partner">Esperant que el vostre company confirmi…</string>

<string name="sas_verified">Verificat!</string>
<string name="sas_verified_successful">Heu verificat aquest dispositiu amb èxit.</string>
<string name="sas_verified_successful_description">Els missatges segurs amb aquest usuari estan encriptats end-to-end i no serà possible llegir-los per tercers.</string>
<string name="sas_got_it">Entesos</string>

<string name="sas_verifying_keys">No surt res\? Encara no tots els clients suporten la verificació interactiva. Useu el mètode de verificació antic.</string>
<string name="sas_legacy_verification_button_title">Useu el mètode antic de verificació.</string>

<string name="sas_verification_request_notification_channel_title">Verificació de clau</string>
<string name="sas_cancelled_dialog_title">Sol·licitud cancel·lada</string>
<string name="sas_cancelled_by_other">L\'altre part ha cancel·lat la verificació.
\n%s</string>
<string name="sas_cancelled_by_me">S\'ha cancel·lat la verificació.
\nMotiu: %s</string>

<string name="sas_verification_request_notification_channel">Verificació de dispositiu interactiva</string>
<string name="sas_incoming_request_notif_title">Sol·licitud de verificació</string>
<string name="sas_incoming_request_notif_content">%s vol verificar el vostre dispositiu</string>

<string name="sas_error_m_user">L\'usuari ha cancel·lat la verificació</string>
<string name="sas_error_m_timeout">El marge de temps pel procés de verificació ha expirat</string>
<string name="sas_error_m_unknown_transaction">El dispositiu no coneix la transacció</string>
<string name="sas_error_m_unknown_method">El dispositiu no pot acceptar un acord de claus amb mètodes hash, MAC o SAS</string>
<string name="sas_error_m_mismatched_commitment">El compromís del hash no ha coincidit</string>
<string name="sas_error_m_mismatched_sas">El SAS no ha coincidit</string>
<string name="sas_error_m_unexpected_message">El dispositiu ha rebut un missatge inesperat</string>
<string name="sas_error_m_invalid_message">S\'ha rebut un missatge invàlid</string>
<string name="sas_error_m_key_mismatch">La clau no coincideix</string>
<string name="sas_error_m_user_error">L\'usuari no coincideix</string>
<string name="sas_error_unknown">Error desconegut</string>


<string name="edit">Editar</string>
<string name="reply">Respondre</string>

<string name="global_retry">Tornar-ho a provar</string>
<string name="room_list_empty">Unir-se a una sala per començar usant l\'app.</string>
<string name="send_you_invite">Se t\'ha enviat una invitació</string>
<string name="invited_by">Convidat per %s</string>

<string name="room_list_catchup_empty_title">Esteu al dia!</string>
<string name="room_list_catchup_empty_body">No teniu més missatges sense llegir</string>
<string name="room_list_catchup_welcome_title">Benvingut a casa!</string>
<string name="room_list_catchup_welcome_body">Posar-se al dia dels missatges sense llegir</string>
<string name="room_list_people_empty_title">Converses</string>
<string name="room_list_people_empty_body">Els vostres missatges directes es mostraran aquí</string>
<string name="room_list_rooms_empty_title">Sales</string>
<string name="room_list_rooms_empty_body">Les vostres sales es mostraran aquí</string>

<string name="title_activity_emoji_reaction_picker">Reaccions</string>
<string name="reactions_agree">Confirmar</string>
<string name="reactions_like">M\'agrada</string>
<string name="message_add_reaction">Afegir reacció</string>
<string name="message_view_reaction">Veure reaccions</string>
<string name="reactions">Reaccions</string>

<string name="event_redacted_by_user_reason">Esdeveniment eliminat per l\'usuari</string>
<string name="event_redacted_by_admin_reason">Esdeveniment moderat per l\'administrador de la sala</string>
<string name="last_edited_info_message">Última edició per %s el %s</string>


<string name="malformed_message">Esdeveniment mal format, no es pot mostrar</string>
<string name="create_new_room">Crear sala nova</string>
<string name="error_no_network">No hi ha xarxa. Si us plau comproveu la vostra connexió a internet.</string>
<string name="action_change">Canviar</string>
<string name="change_room_directory_network">Canviar de xarxa</string>
<string name="please_wait">Espereu, si us plau…</string>
<string name="group_all_communities">Totes les comunitats</string>

<string name="room_preview_no_preview">Aquesta sala no es pot pre-visualitzar</string>
<string name="room_preview_world_readable_room_not_supported_yet">RiotX encara no suporta la pre-visualització de sales llegibles per tothom</string>

<string name="fab_menu_create_room">Sales</string>
<string name="fab_menu_create_chat">Missatges directes</string>

<string name="create_room_title">Sala nova</string>
<string name="create_room_action_create">CREAR</string>
<string name="create_room_name_hint">Nom de la sala</string>
<string name="create_room_public_title">Públic</string>
<string name="create_room_public_description">Qualsevol podrà unir-se a aquesta sala</string>
<string name="create_room_directory_title">Directori de sales</string>
<string name="create_room_directory_description">Publicar aquesta sala al directori de sales</string>

<string name="keys_backup_unable_to_get_trust_info">Hi ha hagut un error rebent informació de confança</string>
<string name="keys_backup_unable_to_get_keys_backup_data">Hi ha hagut un error rebent dades de la còpia de seguretat de les claus</string>

<string name="alpha_disclaimer_title">Benvinguts a la beta!</string>
<string name="alpha_disclaimer_content_line_1">Mentre RiotX estigui en les primeres etapes de desenvolupament, faltaran algunes funcions i podríeu experimentar alguns errors.</string>
<string name="alpha_disclaimer_content_line_2_gplay">L\'última llista de característiques està sempre a %1$s, i si trobeu errors si us plau reporteu informe des de la part superior esquerra del menú d\'Inici, i el resoldrem tan aviat com puguem.</string>
<string name="alpha_disclaimer_content_line_2_gplay_colored_part">Descripció de la Play Store</string>
<string name="alpha_disclaimer_content_line_2_fdroid">Si trobeu errors si us plau envieu un informe d\'errors des de la part superior esquerra del menú d\'Inici, i el resoldrem tan aviat com puguem.</string>

<string name="import_e2e_keys_from_file">Importar claus e2e des del fitxer \"%1$s\".</string>

<string name="settings_sdk_version">Versió de l\'SDK de Matrix</string>
<string name="navigate_to_room_when_already_in_the_room">Ja esteu veient aquesta sala!</string>

<string name="quick_reactions">Reaccions ràpides</string>

<string name="settings_general_title">General</string>
<string name="settings_preferences">Preferències</string>
<string name="settings_security_and_privacy">Seguretat i privadesa</string>
<string name="settings_expert">Expert</string>
</resources>

View File

@ -210,7 +210,7 @@ Du wurdest auf allen Geräten abgemeldet und wirst keine Push-Benachrichtigungen
<!-- accounts list Screen -->

<!-- image size selection -->
<string name="compression_options">Sende als</string>
<string name="compression_options">"Sende als "</string>
<string name="compression_opt_list_original">Original</string>
<string name="compression_opt_list_large">Groß</string>
<string name="compression_opt_list_medium">Mittel</string>
@ -1551,113 +1551,4 @@ Wenn du diese neue Wiederherstellungsmethode nicht eingerichtet hast, kann ein A
<string name="create_room_directory_title">Raumverzeichnis</string>
<string name="create_room_directory_description">Veröffentliche diesen Raum ins Raumverzeichnis</string>

<string name="settings_integration_manager">Integrationsmanager</string>

<string name="integration_manager_not_configured">Kein Integrationsmanager konfiguriert.</string>
<string name="key_share_request">Schlüsselfreigabe Anfordern</string>
<string name="keys_backup_setup_override_backup_prompt_description">Es sieht so aus, als hätten Sie bereits ein Setup-Schlüssel-Backup von einem anderen Gerät. Möchten Sie es durch das ersetzen, das Sie gerade erstellen\?</string>
<string name="sas_security_advise">Für maximale Sicherheit empfehlen wir, dies persönlich zu tun oder ein anderes vertrauenswürdiges Kommunikationsmittel zu verwenden.</string>
<string name="sas_incoming_request_description">Überprüfen Sie dieses Gerät, um es als vertrauenswürdig zu markieren. Das Vertrauen auf Geräte von Partnern gibt Ihnen zusätzliche Sicherheit, wenn Sie verschlüsselte End-to-End-Nachrichten verwenden.</string>
<string name="sas_incoming_request_description_2">Das Verifizieren dieses Benutzers wird seine Geräte als \"vertraut\" markieren und dein Gerät bei ihnen als \"vertraut\" markieren.</string>

<string name="sas_emoji_description">Verifizieren Sie diesen Benutzer, indem Sie bestätigen, dass folgendes Emoji auf dessen Bildschirm erscheint.</string>
<string name="sas_decimal_description">Verifizieren Sie diesen Benutzer, indem Sie bestätigen, dass die folgende Nummer auf dessen Bildschirm erscheint.</string>

<string name="sas_verifying_keys">Es ist nichts aufgetaucht\? Noch nicht alle Clients unterstützen die interaktive Verifikation. <button>Nutze alte Verifikation</button>.</string>
<string name="sas_legacy_verification_button_title">Verwenden Sie die Alte-Überprüfung</string>

<string name="sas_error_m_unknown_transaction">Das Gerät kennt diese Transaktion nicht</string>
<string name="sas_error_m_mismatched_commitment">Die Hash-Verpflichtung stimmte nicht überein</string>
<string name="sas_error_m_mismatched_sas">Die SAS stimmte nicht überein</string>
<string name="sas_error_m_key_mismatch">Wiederherstellungsschlüssel passt nicht</string>
<string name="sas_error_m_user_error">Der Benutzer Wiederherstellungsschlüssel passt nicht</string>
<string name="room_list_catchup_welcome_body">Informieren Sie sich hier über ungelesene Nachrichten</string>
<string name="room_list_people_empty_body">Ihre direkte Konversation wird hier angezeigt</string>
<string name="malformed_message">Fehlerhaftes Ereignis, kann nicht angezeigt werden</string>
<string name="keys_backup_unable_to_get_trust_info">Beim Abrufen der Vertrauensinformationen ist ein Fehler aufgetreten</string>
<string name="keys_backup_unable_to_get_keys_backup_data">Beim Abrufen der Schlüsselsicherungsdaten ist ein Fehler aufgetreten</string>

<string name="alpha_disclaimer_title">Willkommen in der Beta!</string>
<string name="alpha_disclaimer_content_line_1">Während sich RiotX in der frühen Entwicklung befindet, fehlen möglicherweise einige Funktionen und es können Fehler auftreten.</string>
<string name="alpha_disclaimer_content_line_2_gplay_colored_part">Play Store Beschreibung</string>
<string name="settings_sdk_version">Matrix SDK Version</string>
<string name="settings_other_third_party_notices">Sonstige Hinweise Dritter</string>
<string name="navigate_to_room_when_already_in_the_room">Sie sehen diesen Raum bereits!</string>

<string name="quick_reactions">Schnelle Reaktionen</string>

<string name="settings_general_title">Allgemein</string>
<string name="settings_preferences">Einstellungen</string>
<string name="settings_security_and_privacy">Sicherheit &amp; Privatsphäre</string>
<string name="settings_expert">Experte</string>
<string name="settings_push_rules">Push-Regeln</string>
<string name="settings_push_rules_no_rules">Keine Push-Regeln definiert</string>
<string name="settings_push_gateway_no_pushers">Keine registrierten Push-Gateways</string>

<string name="preference_voice_and_video">Sprache &amp; Video</string>
<string name="preference_root_help_about">Hilfe &amp; Über</string>


<string name="settings_troubleshoot_test_token_registration_quick_fix">Token registrieren</string>

<string name="send_suggestion">Mache einen Vorschlag</string>
<string name="send_suggestion_content">Bitte schreiben Sie Ihren Vorschlag unten.</string>
<string name="send_suggestion_report_placeholder">Beschreiben Sie hier Ihren Vorschlag</string>
<string name="settings_labs_show_hidden_events_in_timeline">Versteckte Ereignisse in der Zeitleiste anzeigen</string>

<string name="bottom_action_people_x">Direkte Nachrichten</string>

<string name="send_file_step_idle">Warten…</string>
<string name="send_file_step_encrypting_thumbnail">Miniaturbild wird verschlüsselt…</string>
<string name="send_file_step_encrypting_file">Datei wird verschlüsselt…</string>
<string name="edited_suffix">(bearbeitet)</string>

<string name="message_edits">Nachrichtenbearbeitung</string>
<string name="no_message_edits_found">Keine Änderungen gefunden</string>

<string name="room_filtering_filter_hint">Gespräche filtern…</string>
<string name="room_filtering_footer_create_new_direct_message">Senden Sie eine neue Direktnachricht</string>
<string name="room_filtering_footer_open_room_directory">Das Raumverzeichnis anzeigen</string>

<string name="link_copied_to_clipboard">Link in die Zwischenablage kopiert</string>

<string name="add_by_matrix_id">Nach Matrix-ID hinzufügen</string>
<string name="creating_direct_room">Raum erstellen…</string>
<string name="message_view_edit_history">Bearbeitungsverlauf anzeigen</string>

<string name="sas_cancelled_by_other">Die andere Partei hat die Überprüfung abgebrochen.
\n%s</string>
<string name="sas_error_m_unknown_method">Das Gerät kann sich nicht auf eine Schlüsselvereinbarung, eine Hash-, eine MAC- oder eine SAS-Methode einigen</string>
<string name="alpha_disclaimer_content_line_2_gplay">Die neueste Featureliste befindet sich immer in %1$s. Wenn Sie Fehler finden, senden Sie uns bitte einen Bericht im Menü oben links von \"Startseite\". Wir werden den Fehler so schnell wie möglich beheben.</string>
<string name="alpha_disclaimer_content_line_2_fdroid">Wenn Sie Fehler finden, senden Sie uns bitte einen Bericht im Menü oben links von \"Startseite\". Wir werden diese so schnell wie möglich beheben.</string>

<string name="import_e2e_keys_from_file">Importieren Sie e2e-Schlüssel aus der Datei \"%1$s\".</string>

<string name="send_suggestion_sent">Vielen Dank, der Vorschlag wurde erfolgreich gesendet</string>
<string name="send_suggestion_failed">Der Vorschlag konnte nicht gesendet werden (%s)</string>

<string name="store_riotx_title">RiotX - Matrix Client der nächsten Generation</string>
<string name="store_riotx_short_description">Ein schnellerer und leichterer Client für Matrix mit den neuesten Android-Frameworks</string>
<string name="send_file_step_sending_thumbnail">Miniaturbild wird gesendet (%1$s / %2$s)</string>
<string name="send_file_step_sending_file">Datei wird gesendet (%1$s / %2$s)</string>

<string name="downloading_file">Datei %1$s wird heruntergeladen …</string>
<string name="downloaded_file">Die Datei %1$s wurde heruntergeladen!</string>

<string name="riotx_no_registration_notice">%1$s , um ein Konto zu erstellen.</string>
<string name="riotx_no_registration_notice_colored_part">Benutze die alte App</string>


<string name="room_filtering_footer_title">Können Sie nicht finden, wonach Sie suchen\?</string>
<string name="room_filtering_footer_create_new_room">Erstelle einen neuen Raum</string>
<string name="room_directory_search_hint">Name oder ID (#Beispiel: matrix.org)</string>

<string name="labs_swipe_to_reply_in_timeline">Aktivieren Sie das Streichen, um in der Zeitleiste zu antworten</string>

<string name="direct_room_no_known_users">Kein Ergebnis gefunden. Verwenden Sie Nach Matrix-ID hinzufügen, um auf dem Server zu suchen.</string>
<string name="direct_room_start_search">Beginnen Sie mit der Eingabe, um Ergebnisse zu erhalten</string>
<string name="direct_room_filter_hint">Filtern nach Benutzername oder ID…</string>

<string name="joining_room">Raum betreten…</string>

</resources>

View File

@ -331,7 +331,7 @@ Ziur zaude?</string>
<string name="room_unsent_messages_notification">Bidali gabeko mezuak daude. %1$s edo %2$s orain?</string>
<string name="room_unknown_devices_messages_notification">Mezuak ez dira bidali gailu ezezagunak daudelako. %1$s edo %2$s orain?</string>
<string name="room_prompt_resend">Birbidali dena</string>
<string name="room_prompt_cancel">Utzi dena</string>
<string name="room_prompt_cancel">utzi dena</string>
<string name="room_resend_unsent_messages">Birbidali bidali gabeko mezuak</string>
<string name="room_delete_unsent_messages">Ezabatu bidali gabeko mezuak</string>
<string name="room_message_file_not_found">Ez da fitxategia aurkitu</string>
@ -1607,17 +1607,4 @@ Abisua: Fitxategi hau ezabatu daiteke aplikazioa desinstalatzen bada.</string>

<string name="link_copied_to_clipboard">Esteka arbelera kopiatu da</string>

<string name="settings_integration_manager">Integrazio kudeatzailea</string>

<string name="integration_manager_not_configured">Ez da integrazio kudeatzailerik konfiguratu.</string>
<string name="add_by_matrix_id">Gehitu matrix ID bidez</string>
<string name="creating_direct_room">Gela sortzen…</string>
<string name="direct_room_no_known_users">Ez da emaitzarik aurkitu, erabili gehitu matrix ID bidez zerbitzarian bilatzeko.</string>
<string name="direct_room_start_search">Hasi idazten emaitzak jasotzeko</string>
<string name="direct_room_filter_hint">Iragazi erabiltzaile-izena edo ID-a erabiliz…</string>

<string name="joining_room">Gelara elkartzen…</string>

<string name="message_view_edit_history">Ikusi edizioen historiala</string>

</resources>

View File

@ -111,7 +111,7 @@
<string name="send_bug_report_sent">Virheraportti lähetettiin</string>
<string name="send_bug_report_failed">Virheraporttia ei voitu lähettää (%s)</string>
<string name="send_bug_report_progress">Lähetetään (%s%%)</string>
<string name="send_bug_report_app_crashed">Sovellus kaatui viime kerralla. Haluatko tehdä kaatumisesta virheilmoituksen\?</string>
<string name="send_bug_report_app_crashed">Sovellus kaatui viime kerralla. Haluaisitko tehdä kaatumisesta virheilmoituksen\?</string>

<string name="send_files_in">Lähetä</string>
<string name="read_receipt">Luettu</string>
@ -1533,83 +1533,4 @@ Jotta et menetä mitään, automaattiset päivitykset kannattaa pitää käytös

<string name="settings_preferences">Asetukset</string>
<string name="settings_security_and_privacy">Tietoturva ja yksityisyys</string>
<string name="room_list_catchup_empty_title">Olet ajan tasalla!</string>
<string name="last_edited_info_message">Viimeksi muokannut %s %s</string>


<string name="change_room_directory_network">Vaihda verkkoa</string>
<string name="navigate_to_room_when_already_in_the_room">Katselet jo tätä huonetta!</string>

<string name="settings_general_title">Yleiset</string>
<string name="preference_voice_and_video">Ääni ja video</string>
<string name="preference_root_help_about">Ohje ja tietoa</string>


<string name="send_suggestion">Tee ehdotus</string>
<string name="send_suggestion_content">Kirjoita ehdotuksesi alle.</string>
<string name="send_suggestion_report_placeholder">Kuvaile ehdotuksesi tässä</string>
<string name="send_suggestion_sent">Kiitos, ehdotus on lähetetty</string>
<string name="send_suggestion_failed">Ehdotuksen lähettäminen epäonnistui (%s)</string>

<string name="settings_labs_show_hidden_events_in_timeline">Näytä piilotetut tapahtumat aikajanalla</string>

<string name="store_riotx_title">RiotX - seuraavan sukupolven Matrix-asiakasohjelma</string>
<string name="store_riotx_short_description">Nopeampi ja kevyempi Matrix-asiakasohjelma</string>
<string name="bottom_action_people_x">Yksityisviestit</string>

<string name="send_file_step_idle">Odotetaan…</string>
<string name="send_file_step_encrypting_file">Salataan tiedostoa…</string>
<string name="send_file_step_sending_file">Lähetetään tiedostoa (%1$s / %2$s)</string>

<string name="downloading_file">Ladataan tiedostoa %1$s…</string>
<string name="downloaded_file">Tiedosto %1$s ladattu!</string>

<string name="edited_suffix">(muokattu)</string>

<string name="riotx_no_registration_notice_colored_part">Käytä vanhaa sovellusta</string>


<string name="no_message_edits_found">Muokkauksia ei löytynyt</string>

<string name="room_filtering_filter_hint">Suodata keskusteluja…</string>
<string name="room_filtering_footer_title">Etkö löydä, mitä etsit\?</string>
<string name="room_filtering_footer_create_new_room">Luo uusi huone</string>
<string name="room_filtering_footer_create_new_direct_message">Lähetä uusi yksityisviesti</string>
<string name="room_filtering_footer_open_room_directory">Näytä huoneluettelo</string>

<string name="link_copied_to_clipboard">Linkki kopioitu leikepöydälle</string>

<string name="creating_direct_room">Luodaan huonetta…</string>
<string name="direct_room_start_search">Näet tuloksia kirjoittamalla jotain</string>
<string name="joining_room">Liitytään huoneeseen…</string>

<string name="message_view_edit_history">Näytä muokkaushistoria</string>

<string name="title_activity_verify_device">Vahvista laite</string>

<string name="start_verification_short_label">Vahvista</string>
<string name="key_share_request">Avaimen jakopyyntö</string>
<string name="sas_verify_start_button_title">Aloita vahvistaminen</string>
<string name="sas_incoming_request_title">Saapuva vahvistuspyyntö</string>
<string name="sas_incoming_verification_request_dialog">Vastaanotit saapuvan vahvistuspyynnön.</string>
<string name="sas_verified">Vahvistettu!</string>
<string name="sas_verified_successful">Vahvistit tämän laitteen onnistuneesti.</string>
<string name="sas_verification_request_notification_channel_title">Avaimen vahvistus</string>
<string name="sas_cancelled_by_other">Toinen osapuoli perui vahvistuksen.
\n%s</string>
<string name="sas_cancelled_by_me">Vahvistus on peruttu.
\nSyy: %s</string>

<string name="sas_verification_request_notification_channel">Vuorovaikutteinen laitteen vahvistus</string>
<string name="sas_incoming_request_notif_title">Vahvistuspyyntö</string>
<string name="sas_incoming_request_notif_content">%s haluaa vahvistaa laitteesi</string>

<string name="sas_error_m_user">Käyttäjä perui vahvistuksen</string>
<string name="sas_error_m_timeout">Vahvistustoimenpide aikakatkaistiin</string>
<string name="create_room_directory_title">Huoneluettelo</string>
<string name="create_room_directory_description">Julkaise tämä huone huoneluettelossa</string>

<string name="alpha_disclaimer_content_line_2_gplay_colored_part">Play Storen kuvaus</string>
<string name="settings_push_rules">Push-säännöt</string>
<string name="riotx_no_registration_notice">%1$s luodaksesi tilin.</string>
</resources>

View File

@ -219,7 +219,7 @@
<string name="room_message_placeholder_encrypted">Envoyer un message chiffré…</string>
<string name="room_message_placeholder_not_encrypted">Envoyer un message (non chiffré)…</string>
<string name="room_prompt_resend">Tout renvoyer</string>
<string name="room_prompt_cancel">Tout annuler</string>
<string name="room_prompt_cancel">tout annuler</string>
<string name="room_resend_unsent_messages">Renvoyer les messages non envoyés</string>
<string name="room_delete_unsent_messages">Supprimer les messages non envoyés</string>
<string name="room_message_file_not_found">Fichier non trouvé</string>
@ -1612,17 +1612,4 @@ Si vous navez pas configuré de nouvelle méthode de récupération, un attaq

<string name="link_copied_to_clipboard">Lien copié dans le presse-papiers</string>

<string name="settings_integration_manager">Gestionnaire dintégrations</string>

<string name="integration_manager_not_configured">Aucun gestionnaire dintégrations nest configuré.</string>
<string name="add_by_matrix_id">Ajouter par identifiant matrix</string>
<string name="creating_direct_room">Création du salon…</string>
<string name="direct_room_no_known_users">Aucun résultat trouvé, utilisez Ajouter par identifiant matrix pour chercher sur le serveur.</string>
<string name="direct_room_start_search">Entrez du texte pour avoir des résultats</string>
<string name="direct_room_filter_hint">Filtrer par nom dutilisateur ou identifiant…</string>

<string name="joining_room">En train de rejoindre le salon…</string>

<string name="message_view_edit_history">Voir lhistorique des éditions</string>

</resources>

View File

@ -329,7 +329,7 @@ Kérlek engedélyezd a hozzáférést a következő felugró ablakban, hogy tudj
<string name="room_unsent_messages_notification">Üzenetek nem kerültek elküldésre. %1$s vagy %2$s most?</string>
<string name="room_unknown_devices_messages_notification">Üzenetek nem kerültek elküldésre mert egy ismeretlen eszköz van jelen. %1$s vagy %2$s most?</string>
<string name="room_prompt_resend">Összes újraküldése</string>
<string name="room_prompt_cancel">Összes elvetése</string>
<string name="room_prompt_cancel">Összes megszüntetése</string>
<string name="room_resend_unsent_messages">El nem küldött üzenetek újraküldése</string>
<string name="room_delete_unsent_messages">El nem küldött üzenetek törlése</string>
<string name="room_message_file_not_found">Fájl nem található</string>
@ -1611,17 +1611,4 @@ Ha nem te állítottad be a visszaállítási metódust, akkor egy támadó pró

<string name="link_copied_to_clipboard">Hivatkozás a vágólapra másolva</string>

<string name="settings_integration_manager">Integrációs Menedzser</string>

<string name="integration_manager_not_configured">Integrációs Menedzser nincs beállítva.</string>
<string name="add_by_matrix_id">Hozzáadás matrix ID-vel</string>
<string name="creating_direct_room">Szoba létrehozása…</string>
<string name="direct_room_no_known_users">Nincs találat, használd a „Hozzáadás matrix ID-vel”-t a szerveren való kereséshez.</string>
<string name="direct_room_start_search">A találatokhoz kezdj gépelni</string>
<string name="direct_room_filter_hint">Szűrés felhasználói névre vagy azonosítóra…</string>

<string name="joining_room">Szobába belépés…</string>

<string name="message_view_edit_history">Szerkesztési napló megtekintése</string>

</resources>

View File

@ -362,7 +362,7 @@ Sicuro di procedere?</string>
<string name="room_unsent_messages_notification">Messaggi non inviati. %1$s o %2$s ora?</string>
<string name="room_unknown_devices_messages_notification">Messaggi non inviati a causa di dispositivi sconosciuti qui presenti. %1$s o %2$s ora?</string>
<string name="room_prompt_resend">Rispedisci tutto</string>
<string name="room_prompt_cancel">Annulla tutto</string>
<string name="room_prompt_cancel">annulla tutto</string>
<string name="room_resend_unsent_messages">Rinvia messaggi non spediti</string>
<string name="room_delete_unsent_messages">Elimina messaggi non spediti</string>
<string name="room_message_file_not_found">File non trovato</string>
@ -1656,17 +1656,4 @@ Per essere certo di non perdere nulla, mantieni gli aggiornamenti attivi."</stri

<string name="link_copied_to_clipboard">Collegamento copiato negli appunti</string>

<string name="settings_integration_manager">Gestore dell\'integrazione</string>

<string name="integration_manager_not_configured">Nessun gestore integrazione configurato.</string>
<string name="add_by_matrix_id">Aggiungi per ID matrix</string>
<string name="creating_direct_room">Creare una stanza …</string>
<string name="direct_room_no_known_users">Nessun risultato trovato, usa \"Aggiungi per ID matrix\" per cercare sul server.</string>
<string name="direct_room_start_search">Inizia a digitare per ottenere risultati</string>
<string name="direct_room_filter_hint">Filtra per nome utente o ID …</string>

<string name="joining_room">Sto entrando nella stanza …</string>

<string name="message_view_edit_history">Visualizza Modifica cronologia</string>

</resources>

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More