mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-03-18 04:08:44 +03:00
Post merge fixes
This commit is contained in:
parent
fb9abefe59
commit
7354eab061
4 changed files with 7 additions and 4 deletions
|
@ -23,6 +23,7 @@ import im.vector.matrix.android.internal.session.room.RoomAPI
|
|||
import im.vector.matrix.android.internal.session.room.send.LocalEchoUpdater
|
||||
import im.vector.matrix.android.internal.session.room.send.SendResponse
|
||||
import im.vector.matrix.android.internal.task.Task
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
import javax.inject.Inject
|
||||
|
||||
internal interface SendVerificationMessageTask : Task<SendVerificationMessageTask.Params, String> {
|
||||
|
@ -35,7 +36,8 @@ internal interface SendVerificationMessageTask : Task<SendVerificationMessageTas
|
|||
internal class DefaultSendVerificationMessageTask @Inject constructor(
|
||||
private val localEchoUpdater: LocalEchoUpdater,
|
||||
private val encryptEventTask: DefaultEncryptEventTask,
|
||||
private val roomAPI: RoomAPI) : SendVerificationMessageTask {
|
||||
private val roomAPI: RoomAPI,
|
||||
private val eventBus: EventBus) : SendVerificationMessageTask {
|
||||
|
||||
override suspend fun execute(params: SendVerificationMessageTask.Params): String {
|
||||
val event = handleEncryption(params)
|
||||
|
@ -43,7 +45,7 @@ internal class DefaultSendVerificationMessageTask @Inject constructor(
|
|||
|
||||
try {
|
||||
localEchoUpdater.updateSendState(localID, SendState.SENDING)
|
||||
val executeRequest = executeRequest<SendResponse> {
|
||||
val executeRequest = executeRequest<SendResponse>(eventBus) {
|
||||
apiCall = roomAPI.send(
|
||||
localID,
|
||||
roomId = event.roomId ?: "",
|
||||
|
|
|
@ -199,6 +199,7 @@ internal class RoomSyncHandler @Inject constructor(private val readReceiptHandle
|
|||
|
||||
val timelineEvents = ArrayList<TimelineEventEntity>(eventList.size)
|
||||
for (event in eventList) {
|
||||
event.ageLocalTs = event.unsignedData?.age?.let { syncLocalTimestampMillis - it }
|
||||
chunkEntity.add(roomEntity.roomId, event, PaginationDirection.FORWARDS, stateIndexOffset)?.also {
|
||||
timelineEvents.add(it)
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<string name="key_verification_request_fallback_message">%s is requesting to verify your key, but your client does not support in-chat key verification. You will need to use legacy key verification to verify keys.</string>
|
||||
</resources>
|
||||
|
|
|
@ -310,7 +310,7 @@ class RoomDetailViewModel @AssistedInject constructor(@Assisted initialState: Ro
|
|||
fun isMenuItemVisible(@IdRes itemId: Int) = when (itemId) {
|
||||
R.id.clear_message_queue ->
|
||||
/* For now always disable on production, worker cancellation is not working properly */
|
||||
timeline.pendingEventCount() > 0 && BuildConfig.DEBUG
|
||||
timeline.pendingEventCount() > 0 && vectorPreferences.developerMode()
|
||||
R.id.resend_all -> timeline.failedToDeliverEventCount() > 0
|
||||
R.id.clear_all -> timeline.failedToDeliverEventCount() > 0
|
||||
else -> false
|
||||
|
|
Loading…
Add table
Reference in a new issue