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