From d953de9f663b80a4449d8c21c653b79114e39bb9 Mon Sep 17 00:00:00 2001 From: yostyle Date: Thu, 1 Aug 2024 12:04:44 +0200 Subject: [PATCH] Simplify report content feature --- towncrier.toml | 2 +- vector-app/build.gradle | 2 +- .../detail/timeline/action/EventSharedAction.kt | 2 +- .../timeline/action/MessageActionsViewModel.kt | 16 +++++++++------- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/towncrier.toml b/towncrier.toml index dda34dc633..ef95bd7173 100644 --- a/towncrier.toml +++ b/towncrier.toml @@ -1,5 +1,5 @@ [tool.towncrier] - version = "2.13.1" + version = "2.13.2" directory = "changelog.d" filename = "TCHAP_CHANGES.md" name = "Changes in Tchap" diff --git a/vector-app/build.gradle b/vector-app/build.gradle index 74e083e1d4..8bad1ad7d2 100644 --- a/vector-app/build.gradle +++ b/vector-app/build.gradle @@ -37,7 +37,7 @@ ext.versionMinor = 13 // Note: even values are reserved for regular release, odd values for hotfix release. // When creating a hotfix, you should decrease the value, since the current value // is the value for the next regular release. -ext.versionPatch = 1 +ext.versionPatch = 2 static def getGitTimestamp() { def cmd = 'git show -s --format=%ct' diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/action/EventSharedAction.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/action/EventSharedAction.kt index 0645ffc591..2da3a25877 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/action/EventSharedAction.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/action/EventSharedAction.kt @@ -95,7 +95,7 @@ sealed class EventSharedAction( EventSharedAction(CommonStrings.report_content_inappropriate, R.drawable.ic_report_inappropriate) data class ReportContentCustom(val eventId: String, val senderId: String?) : - EventSharedAction(CommonStrings.report_content_custom, R.drawable.ic_report_custom) + EventSharedAction(CommonStrings.report_content, R.drawable.ic_flag) // TCHAP Use custom report content by default. data class IgnoreUser(val senderId: String?) : EventSharedAction(CommonStrings.message_ignore_user, R.drawable.ic_alert_triangle, true) diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/action/MessageActionsViewModel.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/action/MessageActionsViewModel.kt index ea15154698..c3141b6d1f 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/action/MessageActionsViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/action/MessageActionsViewModel.kt @@ -424,17 +424,19 @@ class MessageActionsViewModel @AssistedInject constructor( if (session.myUserId != timelineEvent.root.senderId) { // not sent by me if (timelineEvent.root.isContentReportable()) { - add(EventSharedAction.ReportContent(eventId, timelineEvent.root.senderId)) + // TCHAP Use custom report content by default. + add(EventSharedAction.ReportContentCustom(eventId, timelineEvent.root.senderId)) } add(EventSharedAction.Separator) add(EventSharedAction.IgnoreUser(timelineEvent.root.senderId)) - add( - EventSharedAction.ReportUser( - eventId = eventId, - senderId = timelineEvent.root.senderId, - ) - ) + // TCHAP Hide user report feature in event action list. +// add( +// EventSharedAction.ReportUser( +// eventId = eventId, +// senderId = timelineEvent.root.senderId, +// ) +// ) } }