mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-07-28 18:40:09 +00:00
Merge branch 'master' into master-android
This commit is contained in:
+1
-1
@@ -105,7 +105,7 @@ class AppPreferences {
|
||||
val privacyAcceptImages = mkBoolPreference(SHARED_PREFS_PRIVACY_ACCEPT_IMAGES, true)
|
||||
val privacyLinkPreviews = mkBoolPreference(SHARED_PREFS_PRIVACY_LINK_PREVIEWS, true)
|
||||
val privacyLinkPreviewsShowAlert = mkBoolPreference(SHARED_PREFS_PRIVACY_LINK_PREVIEWS_SHOW_ALERT, true)
|
||||
val privacySanitizeLinks = mkBoolPreference(SHARED_PREFS_PRIVACY_SANITIZE_LINKS, true)
|
||||
val privacySanitizeLinks = mkBoolPreference(SHARED_PREFS_PRIVACY_SANITIZE_LINKS, false)
|
||||
// TODO remove
|
||||
val privacyChatListOpenLinks = mkEnumPreference(SHARED_PREFS_PRIVACY_CHAT_LIST_OPEN_LINKS, PrivacyChatListOpenLinksMode.ASK) { PrivacyChatListOpenLinksMode.values().firstOrNull { it.name == this } }
|
||||
val simplexLinkMode: SharedPreference<SimplexLinkMode> = mkSafeEnumPreference(SHARED_PREFS_PRIVACY_SIMPLEX_LINK_MODE, SimplexLinkMode.default)
|
||||
|
||||
+3
-1
@@ -43,6 +43,7 @@ import kotlinx.serialization.encoding.Encoder
|
||||
import java.io.File
|
||||
import java.net.URI
|
||||
import java.nio.file.Files
|
||||
import kotlin.math.min
|
||||
|
||||
const val MAX_NUMBER_OF_MENTIONS = 3
|
||||
|
||||
@@ -907,7 +908,8 @@ fun ComposeView(
|
||||
if (sanitizedPos == null) {
|
||||
composeState.value = composeState.value.copy(message = s, parsedMessage = parsedMessage)
|
||||
} else {
|
||||
val message = if (sanitizedPos < s.selection.start) s.copy(text = updatedMsg) else ComposeMessage(updatedMsg, TextRange(sanitizedPos, sanitizedPos))
|
||||
val pos = min(updatedMsg.count(), if (sanitizedPos < s.selection.start) s.selection.start else sanitizedPos)
|
||||
val message = s.copy(text = updatedMsg, selection = TextRange(pos))
|
||||
composeState.value = composeState.value.copy(message = message, parsedMessage = updatedParsedMsg)
|
||||
parsedMessage = updatedParsedMsg
|
||||
}
|
||||
|
||||
+1
-1
@@ -391,7 +391,7 @@ fun openBrowserAlert(uri: String, uriHandler: UriHandler) {
|
||||
AlertManager.shared.hideAlert()
|
||||
safeOpenUri(uri, uriHandler)
|
||||
}) {
|
||||
Text(generalGetString(MR.strings.privacy_chat_list_open_full_web_link), Modifier.fillMaxWidth(), textAlign = TextAlign.Center, color = MaterialTheme.colors.error)
|
||||
Text(generalGetString(MR.strings.privacy_chat_list_open_full_web_link), Modifier.fillMaxWidth(), textAlign = TextAlign.Center, color = MaterialTheme.colors.primary)
|
||||
}
|
||||
SectionItemView({
|
||||
AlertManager.shared.hideAlert()
|
||||
|
||||
Reference in New Issue
Block a user