mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
change (preferences) : move from dev settings to advanced settings and add new safety values
This commit is contained in:
+3
-2
@@ -21,6 +21,7 @@ import io.element.android.libraries.matrix.api.core.RoomId
|
||||
import io.element.android.libraries.matrix.api.core.SessionId
|
||||
import io.element.android.libraries.matrix.api.core.ThreadId
|
||||
import io.element.android.libraries.matrix.api.core.UserId
|
||||
import io.element.android.libraries.matrix.api.media.MediaPreviewValue
|
||||
import io.element.android.libraries.matrix.api.notification.NotificationContent
|
||||
import io.element.android.libraries.matrix.api.notification.NotificationData
|
||||
import io.element.android.libraries.matrix.api.permalink.PermalinkParser
|
||||
@@ -292,7 +293,7 @@ class DefaultNotifiableEventResolver @Inject constructor(
|
||||
}
|
||||
|
||||
private suspend fun NotificationContent.MessageLike.RoomMessage.fetchImageIfPresent(client: MatrixClient): Uri? {
|
||||
if (appPreferencesStore.doesHideImagesAndVideosFlow().first()) {
|
||||
if (appPreferencesStore.getTimelineMediaPreviewValueFlow().first() != MediaPreviewValue.On) {
|
||||
return null
|
||||
}
|
||||
val fileResult = when (val messageType = messageType) {
|
||||
@@ -319,7 +320,7 @@ class DefaultNotifiableEventResolver @Inject constructor(
|
||||
}
|
||||
|
||||
private suspend fun NotificationContent.MessageLike.RoomMessage.getImageMimetype(): String? {
|
||||
if (appPreferencesStore.doesHideImagesAndVideosFlow().first()) {
|
||||
if (appPreferencesStore.getTimelineMediaPreviewValueFlow().first() != MediaPreviewValue.On) {
|
||||
return null
|
||||
}
|
||||
return when (val messageType = messageType) {
|
||||
|
||||
Reference in New Issue
Block a user