mirror of
https://github.com/vector-im/riotX-android
synced 2025-10-06 00:02:48 +02:00
Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
e5bf87c09f | ||
|
72515ee635 | ||
|
9fc00fe6ff | ||
|
c08868bc3c | ||
|
18cef243a1 | ||
|
ccf7dd9583 | ||
|
e4375522ff | ||
|
59637c4a6b |
14
CHANGES.md
14
CHANGES.md
@@ -1,3 +1,17 @@
|
||||
Changes in Element 1.1.6 (2021-04-16)
|
||||
===================================================
|
||||
|
||||
Bugfix 🐛:
|
||||
- Fix crash on the timeline
|
||||
- App crashes on "troubleshoot notifications" button (#3187)
|
||||
|
||||
Changes in Element 1.1.5 (2021-04-15)
|
||||
===================================================
|
||||
|
||||
Bugfix 🐛:
|
||||
- Fix crash during Realm migration
|
||||
- Fix crash when playing video (#3179)
|
||||
|
||||
Changes in Element 1.1.4 (2021-04-09)
|
||||
===================================================
|
||||
|
||||
|
2
fastlane/metadata/android/en-US/changelogs/40101050.txt
Normal file
2
fastlane/metadata/android/en-US/changelogs/40101050.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
Main changes in this version: hot fixes for 1.1.4
|
||||
Full changelog: https://github.com/vector-im/element-android/releases/tag/v1.1.5
|
2
fastlane/metadata/android/en-US/changelogs/40101060.txt
Normal file
2
fastlane/metadata/android/en-US/changelogs/40101060.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
Main changes in this version: hot fixes for 1.1.5
|
||||
Full changelog: https://github.com/vector-im/element-android/releases/tag/v1.1.6
|
@@ -6,10 +6,13 @@ apply plugin: 'realm-android'
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
// mavenCentral()
|
||||
//noinspection GrDeprecatedAPIUsage
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath "io.realm:realm-gradle-plugin:10.4.0"
|
||||
// Stick to this version until https://github.com/realm/realm-java/issues/7402 is fixed
|
||||
classpath "io.realm:realm-gradle-plugin:10.3.1"
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -14,7 +14,7 @@ kapt {
|
||||
// Note: 2 digits max for each value
|
||||
ext.versionMajor = 1
|
||||
ext.versionMinor = 1
|
||||
ext.versionPatch = 4
|
||||
ext.versionPatch = 6
|
||||
|
||||
static def getGitTimestamp() {
|
||||
def cmd = 'git show -s --format=%ct'
|
||||
|
@@ -24,9 +24,11 @@ import im.vector.app.core.pushers.PushersManager
|
||||
import im.vector.app.core.resources.StringProvider
|
||||
import im.vector.app.features.settings.troubleshoot.TroubleshootTest
|
||||
import im.vector.app.push.fcm.FcmHelper
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.Job
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
import org.matrix.android.sdk.api.session.pushers.PushGatewayFailure
|
||||
import javax.inject.Inject
|
||||
|
||||
@@ -47,22 +49,26 @@ class TestPushFromPushGateway @Inject constructor(private val context: AppCompat
|
||||
return
|
||||
}
|
||||
action = GlobalScope.launch {
|
||||
status = runCatching { pushersManager.testPush(fcmToken) }
|
||||
.fold(
|
||||
{
|
||||
// Wait for the push to be received
|
||||
description = stringProvider.getString(R.string.settings_troubleshoot_test_push_loop_waiting_for_push)
|
||||
TestStatus.RUNNING
|
||||
},
|
||||
{
|
||||
description = if (it is PushGatewayFailure.PusherRejected) {
|
||||
stringProvider.getString(R.string.settings_troubleshoot_test_push_loop_failed)
|
||||
} else {
|
||||
errorFormatter.toHumanReadable(it)
|
||||
val result = runCatching { pushersManager.testPush(fcmToken) }
|
||||
|
||||
withContext(Dispatchers.Main) {
|
||||
status = result
|
||||
.fold(
|
||||
{
|
||||
// Wait for the push to be received
|
||||
description = stringProvider.getString(R.string.settings_troubleshoot_test_push_loop_waiting_for_push)
|
||||
TestStatus.RUNNING
|
||||
},
|
||||
{
|
||||
description = if (it is PushGatewayFailure.PusherRejected) {
|
||||
stringProvider.getString(R.string.settings_troubleshoot_test_push_loop_failed)
|
||||
} else {
|
||||
errorFormatter.toHumanReadable(it)
|
||||
}
|
||||
TestStatus.FAILED
|
||||
}
|
||||
TestStatus.FAILED
|
||||
}
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -28,8 +28,10 @@ import com.bumptech.glide.signature.ObjectKey
|
||||
import im.vector.app.core.extensions.vectorComponent
|
||||
import im.vector.app.core.files.LocalFilesHelper
|
||||
import im.vector.app.features.media.ImageContentRenderer
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
import okhttp3.OkHttpClient
|
||||
import timber.log.Timber
|
||||
import java.io.IOException
|
||||
@@ -121,10 +123,12 @@ class VectorGlideDataFetcher(context: Context,
|
||||
url = data.url,
|
||||
elementToDecrypt = data.elementToDecrypt)
|
||||
}
|
||||
result.fold(
|
||||
{ callback.onDataReady(it.inputStream()) },
|
||||
{ callback.onLoadFailed(it as? Exception ?: IOException(it.localizedMessage)) }
|
||||
)
|
||||
withContext(Dispatchers.Main) {
|
||||
result.fold(
|
||||
{ callback.onDataReady(it.inputStream()) },
|
||||
{ callback.onLoadFailed(it as? Exception ?: IOException(it.localizedMessage)) }
|
||||
)
|
||||
}
|
||||
}
|
||||
// val url = contentUrlResolver.resolveFullSize(data.url)
|
||||
// ?: return
|
||||
|
@@ -178,10 +178,7 @@ class RoomDetailViewModel @AssistedInject constructor(
|
||||
updateShowDialerOptionState()
|
||||
room.getRoomSummaryLive()
|
||||
viewModelScope.launch {
|
||||
try {
|
||||
room.markAsRead(ReadService.MarkAsReadParams.READ_RECEIPT)
|
||||
} catch (_: Exception) {
|
||||
}
|
||||
tryOrNull { room.markAsRead(ReadService.MarkAsReadParams.READ_RECEIPT) }
|
||||
}
|
||||
// Inform the SDK that the room is displayed
|
||||
session.onRoomDisplayed(initialState.roomId)
|
||||
@@ -546,10 +543,7 @@ class RoomDetailViewModel @AssistedInject constructor(
|
||||
if (trackUnreadMessages.getAndSet(false)) {
|
||||
mostRecentDisplayedEvent?.root?.eventId?.also {
|
||||
viewModelScope.launch {
|
||||
try {
|
||||
room.setReadMarker(it)
|
||||
} catch (_: Exception) {
|
||||
}
|
||||
tryOrNull { room.setReadMarker(it) }
|
||||
}
|
||||
}
|
||||
mostRecentDisplayedEvent = null
|
||||
@@ -1254,7 +1248,7 @@ class RoomDetailViewModel @AssistedInject constructor(
|
||||
}
|
||||
bufferedMostRecentDisplayedEvent.root.eventId?.let { eventId ->
|
||||
viewModelScope.launch {
|
||||
room.setReadReceipt(eventId)
|
||||
tryOrNull { room.setReadReceipt(eventId) }
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -1263,10 +1257,7 @@ class RoomDetailViewModel @AssistedInject constructor(
|
||||
|
||||
private fun handleMarkAllAsRead() {
|
||||
viewModelScope.launch {
|
||||
try {
|
||||
room.markAsRead(ReadService.MarkAsReadParams.BOTH)
|
||||
} catch (_: Exception) {
|
||||
}
|
||||
tryOrNull { room.markAsRead(ReadService.MarkAsReadParams.BOTH) }
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -31,8 +31,10 @@ import im.vector.lib.attachmentviewer.AttachmentInfo
|
||||
import im.vector.lib.attachmentviewer.AttachmentSourceProvider
|
||||
import im.vector.lib.attachmentviewer.ImageLoaderTarget
|
||||
import im.vector.lib.attachmentviewer.VideoLoaderTarget
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
import org.matrix.android.sdk.api.session.events.model.isVideoMessage
|
||||
import org.matrix.android.sdk.api.session.file.FileService
|
||||
import org.matrix.android.sdk.api.session.room.timeline.TimelineEvent
|
||||
@@ -162,10 +164,12 @@ abstract class BaseAttachmentProvider<Type>(
|
||||
elementToDecrypt = data.elementToDecrypt
|
||||
)
|
||||
}
|
||||
result.fold(
|
||||
{ target.onVideoFileReady(info.uid, it) },
|
||||
{ target.onVideoFileLoadFailed(info.uid) }
|
||||
)
|
||||
withContext(Dispatchers.Main) {
|
||||
result.fold(
|
||||
{ target.onVideoFileReady(info.uid, it) },
|
||||
{ target.onVideoFileLoadFailed(info.uid) }
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -19,8 +19,10 @@ package im.vector.app.features.media
|
||||
import im.vector.app.core.date.VectorDateFormatter
|
||||
import im.vector.app.core.resources.StringProvider
|
||||
import im.vector.lib.attachmentviewer.AttachmentInfo
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
import org.matrix.android.sdk.api.session.file.FileService
|
||||
import org.matrix.android.sdk.api.session.room.Room
|
||||
import org.matrix.android.sdk.api.session.room.timeline.TimelineEvent
|
||||
@@ -87,7 +89,9 @@ class DataAttachmentRoomProvider(
|
||||
elementToDecrypt = item.elementToDecrypt
|
||||
)
|
||||
}
|
||||
callback(result.getOrNull())
|
||||
withContext(Dispatchers.Main) {
|
||||
callback(result.getOrNull())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -19,8 +19,10 @@ package im.vector.app.features.media
|
||||
import im.vector.app.core.date.VectorDateFormatter
|
||||
import im.vector.app.core.resources.StringProvider
|
||||
import im.vector.lib.attachmentviewer.AttachmentInfo
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
import org.matrix.android.sdk.api.session.events.model.toModel
|
||||
import org.matrix.android.sdk.api.session.file.FileService
|
||||
import org.matrix.android.sdk.api.session.room.model.message.MessageContent
|
||||
@@ -134,7 +136,9 @@ class RoomEventsAttachmentProvider(
|
||||
url = messageContent.getFileUrl(),
|
||||
elementToDecrypt = messageContent.encryptedFileInfo?.toElementToDecrypt())
|
||||
}
|
||||
callback(result.getOrNull())
|
||||
withContext(Dispatchers.Main) {
|
||||
callback(result.getOrNull())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -25,8 +25,10 @@ import im.vector.app.R
|
||||
import im.vector.app.core.di.ActiveSessionHolder
|
||||
import im.vector.app.core.error.ErrorFormatter
|
||||
import im.vector.app.core.files.LocalFilesHelper
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
import kotlinx.parcelize.Parcelize
|
||||
import org.matrix.android.sdk.internal.crypto.attachments.ElementToDecrypt
|
||||
import timber.log.Timber
|
||||
@@ -83,21 +85,23 @@ class VideoContentRenderer @Inject constructor(private val localFilesHelper: Loc
|
||||
url = data.url,
|
||||
elementToDecrypt = data.elementToDecrypt)
|
||||
}
|
||||
result.fold(
|
||||
{ data ->
|
||||
thumbnailView.isVisible = false
|
||||
loadingView.isVisible = false
|
||||
videoView.isVisible = true
|
||||
withContext(Dispatchers.Main) {
|
||||
result.fold(
|
||||
{ data ->
|
||||
thumbnailView.isVisible = false
|
||||
loadingView.isVisible = false
|
||||
videoView.isVisible = true
|
||||
|
||||
videoView.setVideoPath(data.path)
|
||||
videoView.start()
|
||||
},
|
||||
{
|
||||
loadingView.isVisible = false
|
||||
errorView.isVisible = true
|
||||
errorView.text = errorFormatter.toHumanReadable(it)
|
||||
}
|
||||
)
|
||||
videoView.setVideoPath(data.path)
|
||||
videoView.start()
|
||||
},
|
||||
{
|
||||
loadingView.isVisible = false
|
||||
errorView.isVisible = true
|
||||
errorView.text = errorFormatter.toHumanReadable(it)
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -124,21 +128,23 @@ class VideoContentRenderer @Inject constructor(private val localFilesHelper: Loc
|
||||
url = data.url,
|
||||
elementToDecrypt = null)
|
||||
}
|
||||
result.fold(
|
||||
{ data ->
|
||||
thumbnailView.isVisible = false
|
||||
loadingView.isVisible = false
|
||||
videoView.isVisible = true
|
||||
withContext(Dispatchers.Main) {
|
||||
result.fold(
|
||||
{ data ->
|
||||
thumbnailView.isVisible = false
|
||||
loadingView.isVisible = false
|
||||
videoView.isVisible = true
|
||||
|
||||
videoView.setVideoPath(data.path)
|
||||
videoView.start()
|
||||
},
|
||||
{
|
||||
loadingView.isVisible = false
|
||||
errorView.isVisible = true
|
||||
errorView.text = errorFormatter.toHumanReadable(it)
|
||||
}
|
||||
)
|
||||
videoView.setVideoPath(data.path)
|
||||
videoView.start()
|
||||
},
|
||||
{
|
||||
loadingView.isVisible = false
|
||||
errorView.isVisible = true
|
||||
errorView.text = errorFormatter.toHumanReadable(it)
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -25,6 +25,7 @@ import im.vector.app.core.di.ActiveSessionHolder
|
||||
import im.vector.app.core.extensions.vectorComponent
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.launch
|
||||
import org.matrix.android.sdk.api.extensions.tryOrNull
|
||||
import org.matrix.android.sdk.api.session.Session
|
||||
import org.matrix.android.sdk.api.session.room.Room
|
||||
import org.matrix.android.sdk.api.session.room.read.ReadService
|
||||
@@ -78,7 +79,7 @@ class NotificationBroadcastReceiver : BroadcastReceiver() {
|
||||
val room = session.getRoom(roomId)
|
||||
if (room != null) {
|
||||
GlobalScope.launch {
|
||||
room.join()
|
||||
tryOrNull { room.join() }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -89,7 +90,7 @@ class NotificationBroadcastReceiver : BroadcastReceiver() {
|
||||
val room = session.getRoom(roomId)
|
||||
if (room != null) {
|
||||
GlobalScope.launch {
|
||||
room.leave()
|
||||
tryOrNull { room.leave() }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -100,10 +101,7 @@ class NotificationBroadcastReceiver : BroadcastReceiver() {
|
||||
val room = session.getRoom(roomId)
|
||||
if (room != null) {
|
||||
GlobalScope.launch {
|
||||
try {
|
||||
room.markAsRead(ReadService.MarkAsReadParams.READ_RECEIPT)
|
||||
} catch (_: Exception) {
|
||||
}
|
||||
tryOrNull { room.markAsRead(ReadService.MarkAsReadParams.READ_RECEIPT) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -20,8 +20,11 @@ import androidx.activity.result.ActivityResultLauncher
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.di.ActiveSessionHolder
|
||||
import im.vector.app.core.resources.StringProvider
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
import org.matrix.android.sdk.api.extensions.tryOrNull
|
||||
import org.matrix.android.sdk.api.pushrules.RuleIds
|
||||
import org.matrix.android.sdk.api.pushrules.RuleKind
|
||||
import javax.inject.Inject
|
||||
@@ -50,10 +53,12 @@ class TestAccountSettings @Inject constructor(private val stringProvider: String
|
||||
if (manager?.diagStatus == TestStatus.RUNNING) return // wait before all is finished
|
||||
|
||||
GlobalScope.launch {
|
||||
runCatching {
|
||||
tryOrNull {
|
||||
session.updatePushRuleEnableStatus(RuleKind.OVERRIDE, defaultRule, !defaultRule.enabled)
|
||||
}
|
||||
manager?.retry(activityResultLauncher)
|
||||
withContext(Dispatchers.Main) {
|
||||
manager?.retry(activityResultLauncher)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user