diff --git a/apps/ios/Shared/Views/Chat/ChatView.swift b/apps/ios/Shared/Views/Chat/ChatView.swift index 72718edf37..c0d7b501f5 100644 --- a/apps/ios/Shared/Views/Chat/ChatView.swift +++ b/apps/ios/Shared/Views/Chat/ChatView.swift @@ -1342,9 +1342,9 @@ struct ChatView: View { if ci.chatDir != .groupSnd { if let (groupInfo, _) = ci.memberToModerate(chat.chatInfo) { moderateButton(ci, groupInfo) - } else if ci.meta.itemDeleted == nil, case let .group(gInfo) = chat.chatInfo, gInfo.membership.memberRole == .member, !live, composeState.voiceMessageRecordingState == .noRecording { - reportButton(ci) - } + } // else if ci.meta.itemDeleted == nil, case let .group(gInfo) = chat.chatInfo, gInfo.membership.memberRole == .member, !live, composeState.voiceMessageRecordingState == .noRecording { + // reportButton(ci) + // } } } else if ci.meta.itemDeleted != nil { if revealed { diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/item/ChatItemView.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/item/ChatItemView.kt index e0650e1d80..3b2bf63f28 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/item/ChatItemView.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/item/ChatItemView.kt @@ -400,9 +400,9 @@ fun ChatItemView( val groupInfo = cItem.memberToModerate(cInfo)?.first if (groupInfo != null) { ModerateItemAction(cItem, questionText = moderateMessageQuestionText(cInfo.featureEnabled(ChatFeature.FullDelete), 1), showMenu, deleteMessage) - } else if (cItem.meta.itemDeleted == null && cInfo is ChatInfo.Group && cInfo.groupInfo.membership.memberRole == GroupMemberRole.Member && !live) { - ReportItemAction(cItem, composeState, showMenu) - } + } // else if (cItem.meta.itemDeleted == null && cInfo is ChatInfo.Group && cInfo.groupInfo.membership.memberRole == GroupMemberRole.Member && !live) { + // ReportItemAction(cItem, composeState, showMenu) + // } } if (cItem.canBeDeletedForSelf) { Divider() diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/helpers/AlertManager.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/helpers/AlertManager.kt index 30c5d9cc3c..6bfcf2809f 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/helpers/AlertManager.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/helpers/AlertManager.kt @@ -297,7 +297,7 @@ private fun AlertContent( belowTextContent: @Composable (() -> Unit) = {}, content: @Composable (() -> Unit) ) { - BoxWithConstraints(Modifier.verticalScroll(rememberScrollState())) { + BoxWithConstraints { Column( Modifier .padding(bottom = if (appPlatform.isDesktop) DEFAULT_PADDING else DEFAULT_PADDING_HALF) @@ -311,6 +311,7 @@ private fun AlertContent( if (text != null) { Column(Modifier.heightIn(max = this@BoxWithConstraints.maxHeight * 0.7f) .padding(start = DEFAULT_PADDING, end = DEFAULT_PADDING) + .verticalScroll(rememberScrollState()) ) { SelectionContainer { Text( @@ -333,9 +334,10 @@ private fun AlertContent( @Composable private fun AlertContent(text: AnnotatedString?, hostDevice: Pair?, extraPadding: Boolean = false, content: @Composable (() -> Unit)) { - BoxWithConstraints(Modifier.verticalScroll(rememberScrollState())) { + BoxWithConstraints { Column( Modifier + .verticalScroll(rememberScrollState()) .padding(bottom = if (appPlatform.isDesktop) DEFAULT_PADDING else DEFAULT_PADDING_HALF) ) { if (appPlatform.isDesktop) { @@ -347,6 +349,7 @@ private fun AlertContent(text: AnnotatedString?, hostDevice: Pair if (text != null) { Column( Modifier.heightIn(max = this@BoxWithConstraints.maxHeight * 0.7f) + .verticalScroll(rememberScrollState()) ) { SelectionContainer { Text( diff --git a/src/Simplex/Chat/Protocol.hs b/src/Simplex/Chat/Protocol.hs index 4bddd5f6b4..cf3e36820c 100644 --- a/src/Simplex/Chat/Protocol.hs +++ b/src/Simplex/Chat/Protocol.hs @@ -40,7 +40,7 @@ import Data.Maybe (fromMaybe, mapMaybe) import Data.String import Data.Text (Text) import qualified Data.Text as T -import Data.Text.Encoding (decodeASCII', decodeLatin1, encodeUtf8) +import Data.Text.Encoding (decodeLatin1, encodeUtf8) import Data.Time.Clock (UTCTime) import Data.Type.Equality import Data.Typeable (Typeable) @@ -296,7 +296,7 @@ instance StrEncoding ReportReason where "community" -> pure RRCommunity "profile" -> pure RRProfile "other" -> pure RROther - t -> maybe (fail "bad ReportReason") (pure . RRUnknown) $ decodeASCII' t + t -> pure $ RRUnknown $ safeDecodeUtf8 t instance FromJSON ReportReason where parseJSON = strParseJSON "ReportReason"