mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 06:01:40 +00:00
dependencies(sdk) : update to 0.2.75
This commit is contained in:
@@ -173,7 +173,7 @@ jsoup = "org.jsoup:jsoup:1.18.3"
|
|||||||
appyx_core = { module = "com.bumble.appyx:core", version.ref = "appyx" }
|
appyx_core = { module = "com.bumble.appyx:core", version.ref = "appyx" }
|
||||||
molecule-runtime = "app.cash.molecule:molecule-runtime:2.0.0"
|
molecule-runtime = "app.cash.molecule:molecule-runtime:2.0.0"
|
||||||
timber = "com.jakewharton.timber:timber:5.0.1"
|
timber = "com.jakewharton.timber:timber:5.0.1"
|
||||||
matrix_sdk = "org.matrix.rustcomponents:sdk-android:0.2.73"
|
matrix_sdk = "org.matrix.rustcomponents:sdk-android:0.2.75"
|
||||||
matrix_richtexteditor = { module = "io.element.android:wysiwyg", version.ref = "wysiwyg" }
|
matrix_richtexteditor = { module = "io.element.android:wysiwyg", version.ref = "wysiwyg" }
|
||||||
matrix_richtexteditor_compose = { module = "io.element.android:wysiwyg-compose", version.ref = "wysiwyg" }
|
matrix_richtexteditor_compose = { module = "io.element.android:wysiwyg-compose", version.ref = "wysiwyg" }
|
||||||
sqldelight-driver-android = { module = "app.cash.sqldelight:android-driver", version.ref = "sqldelight" }
|
sqldelight-driver-android = { module = "app.cash.sqldelight:android-driver", version.ref = "sqldelight" }
|
||||||
|
|||||||
+2
-2
@@ -311,8 +311,8 @@ class RustMatrixClient(
|
|||||||
isEncrypted = createRoomParams.isEncrypted,
|
isEncrypted = createRoomParams.isEncrypted,
|
||||||
isDirect = createRoomParams.isDirect,
|
isDirect = createRoomParams.isDirect,
|
||||||
visibility = when (createRoomParams.visibility) {
|
visibility = when (createRoomParams.visibility) {
|
||||||
RoomVisibility.PUBLIC -> RustRoomVisibility.PUBLIC
|
RoomVisibility.PUBLIC -> RustRoomVisibility.Public
|
||||||
RoomVisibility.PRIVATE -> RustRoomVisibility.PRIVATE
|
RoomVisibility.PRIVATE -> RustRoomVisibility.Private
|
||||||
},
|
},
|
||||||
preset = when (createRoomParams.visibility) {
|
preset = when (createRoomParams.visibility) {
|
||||||
RoomVisibility.PRIVATE -> {
|
RoomVisibility.PRIVATE -> {
|
||||||
|
|||||||
+1
@@ -28,4 +28,5 @@ fun ImageInfo.map(): RustImageInfo = RustImageInfo(
|
|||||||
thumbnailInfo = thumbnailInfo?.map(),
|
thumbnailInfo = thumbnailInfo?.map(),
|
||||||
thumbnailSource = null,
|
thumbnailSource = null,
|
||||||
blurhash = blurhash,
|
blurhash = blurhash,
|
||||||
|
isAnimated = null
|
||||||
)
|
)
|
||||||
|
|||||||
+48
-31
@@ -71,6 +71,7 @@ import org.matrix.rustcomponents.sdk.FormattedBody
|
|||||||
import org.matrix.rustcomponents.sdk.MessageFormat
|
import org.matrix.rustcomponents.sdk.MessageFormat
|
||||||
import org.matrix.rustcomponents.sdk.PollData
|
import org.matrix.rustcomponents.sdk.PollData
|
||||||
import org.matrix.rustcomponents.sdk.SendAttachmentJoinHandle
|
import org.matrix.rustcomponents.sdk.SendAttachmentJoinHandle
|
||||||
|
import org.matrix.rustcomponents.sdk.UploadParameters
|
||||||
import org.matrix.rustcomponents.sdk.use
|
import org.matrix.rustcomponents.sdk.use
|
||||||
import timber.log.Timber
|
import timber.log.Timber
|
||||||
import uniffi.matrix_sdk_ui.LiveBackPaginationStatus
|
import uniffi.matrix_sdk_ui.LiveBackPaginationStatus
|
||||||
@@ -323,6 +324,7 @@ class RustTimeline(
|
|||||||
formattedCaption = formattedCaption?.let {
|
formattedCaption = formattedCaption?.let {
|
||||||
FormattedBody(body = it, format = MessageFormat.Html)
|
FormattedBody(body = it, format = MessageFormat.Html)
|
||||||
},
|
},
|
||||||
|
mentions = null,
|
||||||
)
|
)
|
||||||
inner.edit(
|
inner.edit(
|
||||||
newContent = editedContent,
|
newContent = editedContent,
|
||||||
@@ -355,14 +357,17 @@ class RustTimeline(
|
|||||||
val useSendQueue = featureFlagsService.isFeatureEnabled(FeatureFlags.MediaUploadOnSendQueue)
|
val useSendQueue = featureFlagsService.isFeatureEnabled(FeatureFlags.MediaUploadOnSendQueue)
|
||||||
return sendAttachment(listOfNotNull(file, thumbnailFile)) {
|
return sendAttachment(listOfNotNull(file, thumbnailFile)) {
|
||||||
inner.sendImage(
|
inner.sendImage(
|
||||||
url = file.path,
|
params = UploadParameters(
|
||||||
thumbnailUrl = thumbnailFile?.path,
|
filename = file.path,
|
||||||
|
caption = caption,
|
||||||
|
formattedCaption = formattedCaption?.let {
|
||||||
|
FormattedBody(body = it, format = MessageFormat.Html)
|
||||||
|
},
|
||||||
|
useSendQueue = useSendQueue,
|
||||||
|
mentions = null,
|
||||||
|
),
|
||||||
|
thumbnailPath = thumbnailFile?.path,
|
||||||
imageInfo = imageInfo.map(),
|
imageInfo = imageInfo.map(),
|
||||||
caption = caption,
|
|
||||||
formattedCaption = formattedCaption?.let {
|
|
||||||
FormattedBody(body = it, format = MessageFormat.Html)
|
|
||||||
},
|
|
||||||
useSendQueue = useSendQueue,
|
|
||||||
progressWatcher = progressCallback?.toProgressWatcher()
|
progressWatcher = progressCallback?.toProgressWatcher()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -379,14 +384,17 @@ class RustTimeline(
|
|||||||
val useSendQueue = featureFlagsService.isFeatureEnabled(FeatureFlags.MediaUploadOnSendQueue)
|
val useSendQueue = featureFlagsService.isFeatureEnabled(FeatureFlags.MediaUploadOnSendQueue)
|
||||||
return sendAttachment(listOfNotNull(file, thumbnailFile)) {
|
return sendAttachment(listOfNotNull(file, thumbnailFile)) {
|
||||||
inner.sendVideo(
|
inner.sendVideo(
|
||||||
url = file.path,
|
params = UploadParameters(
|
||||||
thumbnailUrl = thumbnailFile?.path,
|
filename = file.path,
|
||||||
|
caption = caption,
|
||||||
|
formattedCaption = formattedCaption?.let {
|
||||||
|
FormattedBody(body = it, format = MessageFormat.Html)
|
||||||
|
},
|
||||||
|
useSendQueue = useSendQueue,
|
||||||
|
mentions = null,
|
||||||
|
),
|
||||||
|
thumbnailPath = thumbnailFile?.path,
|
||||||
videoInfo = videoInfo.map(),
|
videoInfo = videoInfo.map(),
|
||||||
caption = caption,
|
|
||||||
formattedCaption = formattedCaption?.let {
|
|
||||||
FormattedBody(body = it, format = MessageFormat.Html)
|
|
||||||
},
|
|
||||||
useSendQueue = useSendQueue,
|
|
||||||
progressWatcher = progressCallback?.toProgressWatcher()
|
progressWatcher = progressCallback?.toProgressWatcher()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -402,13 +410,16 @@ class RustTimeline(
|
|||||||
val useSendQueue = featureFlagsService.isFeatureEnabled(FeatureFlags.MediaUploadOnSendQueue)
|
val useSendQueue = featureFlagsService.isFeatureEnabled(FeatureFlags.MediaUploadOnSendQueue)
|
||||||
return sendAttachment(listOf(file)) {
|
return sendAttachment(listOf(file)) {
|
||||||
inner.sendAudio(
|
inner.sendAudio(
|
||||||
url = file.path,
|
params = UploadParameters(
|
||||||
|
filename = file.path,
|
||||||
|
caption = caption,
|
||||||
|
formattedCaption = formattedCaption?.let {
|
||||||
|
FormattedBody(body = it, format = MessageFormat.Html)
|
||||||
|
},
|
||||||
|
useSendQueue = useSendQueue,
|
||||||
|
mentions = null,
|
||||||
|
),
|
||||||
audioInfo = audioInfo.map(),
|
audioInfo = audioInfo.map(),
|
||||||
caption = caption,
|
|
||||||
formattedCaption = formattedCaption?.let {
|
|
||||||
FormattedBody(body = it, format = MessageFormat.Html)
|
|
||||||
},
|
|
||||||
useSendQueue = useSendQueue,
|
|
||||||
progressWatcher = progressCallback?.toProgressWatcher()
|
progressWatcher = progressCallback?.toProgressWatcher()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -424,13 +435,16 @@ class RustTimeline(
|
|||||||
val useSendQueue = featureFlagsService.isFeatureEnabled(FeatureFlags.MediaUploadOnSendQueue)
|
val useSendQueue = featureFlagsService.isFeatureEnabled(FeatureFlags.MediaUploadOnSendQueue)
|
||||||
return sendAttachment(listOf(file)) {
|
return sendAttachment(listOf(file)) {
|
||||||
inner.sendFile(
|
inner.sendFile(
|
||||||
url = file.path,
|
params = UploadParameters(
|
||||||
|
filename = file.path,
|
||||||
|
caption = caption,
|
||||||
|
formattedCaption = formattedCaption?.let {
|
||||||
|
FormattedBody(body = it, format = MessageFormat.Html)
|
||||||
|
},
|
||||||
|
useSendQueue = useSendQueue,
|
||||||
|
mentions = null,
|
||||||
|
),
|
||||||
fileInfo = fileInfo.map(),
|
fileInfo = fileInfo.map(),
|
||||||
caption = caption,
|
|
||||||
formattedCaption = formattedCaption?.let {
|
|
||||||
FormattedBody(body = it, format = MessageFormat.Html)
|
|
||||||
},
|
|
||||||
useSendQueue = useSendQueue,
|
|
||||||
progressWatcher = progressCallback?.toProgressWatcher(),
|
progressWatcher = progressCallback?.toProgressWatcher(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -543,13 +557,16 @@ class RustTimeline(
|
|||||||
val useSendQueue = featureFlagsService.isFeatureEnabled(FeatureFlags.MediaUploadOnSendQueue)
|
val useSendQueue = featureFlagsService.isFeatureEnabled(FeatureFlags.MediaUploadOnSendQueue)
|
||||||
return sendAttachment(listOf(file)) {
|
return sendAttachment(listOf(file)) {
|
||||||
inner.sendVoiceMessage(
|
inner.sendVoiceMessage(
|
||||||
url = file.path,
|
params = UploadParameters(
|
||||||
|
filename = file.path,
|
||||||
|
// Maybe allow a caption in the future?
|
||||||
|
caption = null,
|
||||||
|
formattedCaption = null,
|
||||||
|
useSendQueue = useSendQueue,
|
||||||
|
mentions = null,
|
||||||
|
),
|
||||||
audioInfo = audioInfo.map(),
|
audioInfo = audioInfo.map(),
|
||||||
waveform = waveform.toMSC3246range(),
|
waveform = waveform.toMSC3246range(),
|
||||||
// Maybe allow a caption in the future?
|
|
||||||
caption = null,
|
|
||||||
formattedCaption = null,
|
|
||||||
useSendQueue = useSendQueue,
|
|
||||||
progressWatcher = progressCallback?.toProgressWatcher(),
|
progressWatcher = progressCallback?.toProgressWatcher(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
+3
@@ -20,6 +20,7 @@ import javax.inject.Inject
|
|||||||
@ContributesBinding(AppScope::class)
|
@ContributesBinding(AppScope::class)
|
||||||
class RustTracingService @Inject constructor(private val buildMeta: BuildMeta) : TracingService {
|
class RustTracingService @Inject constructor(private val buildMeta: BuildMeta) : TracingService {
|
||||||
override fun setupTracing(tracingConfiguration: TracingConfiguration) {
|
override fun setupTracing(tracingConfiguration: TracingConfiguration) {
|
||||||
|
/*
|
||||||
val filter = tracingConfiguration.filterConfiguration
|
val filter = tracingConfiguration.filterConfiguration
|
||||||
val rustTracingConfiguration = org.matrix.rustcomponents.sdk.TracingConfiguration(
|
val rustTracingConfiguration = org.matrix.rustcomponents.sdk.TracingConfiguration(
|
||||||
filter = tracingConfiguration.filterConfiguration.filter,
|
filter = tracingConfiguration.filterConfiguration.filter,
|
||||||
@@ -28,6 +29,8 @@ class RustTracingService @Inject constructor(private val buildMeta: BuildMeta) :
|
|||||||
)
|
)
|
||||||
org.matrix.rustcomponents.sdk.setupTracing(rustTracingConfiguration)
|
org.matrix.rustcomponents.sdk.setupTracing(rustTracingConfiguration)
|
||||||
Timber.v("Tracing config filter = $filter: ${filter.filter}")
|
Timber.v("Tracing config filter = $filter: ${filter.filter}")
|
||||||
|
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun createTimberTree(): Timber.Tree {
|
override fun createTimberTree(): Timber.Tree {
|
||||||
|
|||||||
+2
@@ -37,6 +37,7 @@ fun aRustEventTimelineItem(
|
|||||||
origin: EventItemOrigin? = EventItemOrigin.SYNC,
|
origin: EventItemOrigin? = EventItemOrigin.SYNC,
|
||||||
canBeRepliedTo: Boolean = true,
|
canBeRepliedTo: Boolean = true,
|
||||||
shieldsState: ShieldState? = null,
|
shieldsState: ShieldState? = null,
|
||||||
|
localCreatedAt: ULong? = null,
|
||||||
) = EventTimelineItem(
|
) = EventTimelineItem(
|
||||||
isRemote = isRemote,
|
isRemote = isRemote,
|
||||||
eventOrTransactionId = eventOrTransactionId,
|
eventOrTransactionId = eventOrTransactionId,
|
||||||
@@ -51,6 +52,7 @@ fun aRustEventTimelineItem(
|
|||||||
reactions = reactions,
|
reactions = reactions,
|
||||||
readReceipts = readReceipts,
|
readReceipts = readReceipts,
|
||||||
origin = origin,
|
origin = origin,
|
||||||
|
localCreatedAt = localCreatedAt,
|
||||||
lazyProvider = FakeRustLazyTimelineItemProvider(
|
lazyProvider = FakeRustLazyTimelineItemProvider(
|
||||||
debugInfo = debugInfo,
|
debugInfo = debugInfo,
|
||||||
shieldsState = shieldsState,
|
shieldsState = shieldsState,
|
||||||
|
|||||||
+3
@@ -13,6 +13,7 @@ import io.element.android.libraries.matrix.test.A_ROOM_NAME
|
|||||||
import org.matrix.rustcomponents.sdk.JoinRule
|
import org.matrix.rustcomponents.sdk.JoinRule
|
||||||
import org.matrix.rustcomponents.sdk.Membership
|
import org.matrix.rustcomponents.sdk.Membership
|
||||||
import org.matrix.rustcomponents.sdk.RoomHero
|
import org.matrix.rustcomponents.sdk.RoomHero
|
||||||
|
import org.matrix.rustcomponents.sdk.RoomHistoryVisibility
|
||||||
import org.matrix.rustcomponents.sdk.RoomInfo
|
import org.matrix.rustcomponents.sdk.RoomInfo
|
||||||
import org.matrix.rustcomponents.sdk.RoomMember
|
import org.matrix.rustcomponents.sdk.RoomMember
|
||||||
import org.matrix.rustcomponents.sdk.RoomNotificationMode
|
import org.matrix.rustcomponents.sdk.RoomNotificationMode
|
||||||
@@ -49,6 +50,7 @@ fun aRustRoomInfo(
|
|||||||
pinnedEventIds: List<String> = listOf(),
|
pinnedEventIds: List<String> = listOf(),
|
||||||
roomCreator: UserId? = null,
|
roomCreator: UserId? = null,
|
||||||
joinRule: JoinRule? = null,
|
joinRule: JoinRule? = null,
|
||||||
|
historyVisibility: RoomHistoryVisibility = RoomHistoryVisibility.Joined,
|
||||||
) = RoomInfo(
|
) = RoomInfo(
|
||||||
id = id,
|
id = id,
|
||||||
displayName = displayName,
|
displayName = displayName,
|
||||||
@@ -81,4 +83,5 @@ fun aRustRoomInfo(
|
|||||||
pinnedEventIds = pinnedEventIds,
|
pinnedEventIds = pinnedEventIds,
|
||||||
creator = roomCreator?.value,
|
creator = roomCreator?.value,
|
||||||
joinRule = joinRule,
|
joinRule = joinRule,
|
||||||
|
historyVisibility = historyVisibility
|
||||||
)
|
)
|
||||||
|
|||||||
+2
@@ -21,6 +21,7 @@ fun aRustRoomMember(
|
|||||||
powerLevel: Long = 0L,
|
powerLevel: Long = 0L,
|
||||||
isIgnored: Boolean = false,
|
isIgnored: Boolean = false,
|
||||||
role: RoomMemberRole = RoomMemberRole.USER,
|
role: RoomMemberRole = RoomMemberRole.USER,
|
||||||
|
membershipChangeReason: String? = null,
|
||||||
) = RoomMember(
|
) = RoomMember(
|
||||||
userId = userId.value,
|
userId = userId.value,
|
||||||
displayName = displayName,
|
displayName = displayName,
|
||||||
@@ -31,4 +32,5 @@ fun aRustRoomMember(
|
|||||||
normalizedPowerLevel = powerLevel,
|
normalizedPowerLevel = powerLevel,
|
||||||
isIgnored = isIgnored,
|
isIgnored = isIgnored,
|
||||||
suggestedRoleForPowerLevel = role,
|
suggestedRoleForPowerLevel = role,
|
||||||
|
membershipChangeReason = membershipChangeReason,
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user