From 855b2ff5b14be644853109d27d3a1d33717a7898 Mon Sep 17 00:00:00 2001 From: Rashed <38612386+rashedswen@users.noreply.github.com> Date: Wed, 1 Mar 2023 10:07:33 +0300 Subject: [PATCH] resolve conflicts --- .idea/kotlinc.xml | 2 +- .../amethyst/service/model/ReportEvent.kt | 4 +++- .../com/vitorpamplona/amethyst/ui/MainActivity.kt | 3 +++ .../com/vitorpamplona/amethyst/ui/note/BlankNote.kt | 2 +- .../vitorpamplona/amethyst/ui/note/NoteCompose.kt | 2 ++ .../amethyst/ui/note/ReplyInformation.kt | 2 +- .../amethyst/ui/screen/loggedIn/ProfileScreen.kt | 12 ++++++++++-- app/src/main/res/values-ar/strings.xml | 9 +++++++-- app/src/main/res/values/strings.xml | 7 ++++++- 9 files changed, 34 insertions(+), 9 deletions(-) diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml index 2b8a50fc2..0fc311313 100644 --- a/.idea/kotlinc.xml +++ b/.idea/kotlinc.xml @@ -1,6 +1,6 @@ - \ No newline at end of file diff --git a/app/src/main/java/com/vitorpamplona/amethyst/service/model/ReportEvent.kt b/app/src/main/java/com/vitorpamplona/amethyst/service/model/ReportEvent.kt index 1d962e421..3d5f5a720 100644 --- a/app/src/main/java/com/vitorpamplona/amethyst/service/model/ReportEvent.kt +++ b/app/src/main/java/com/vitorpamplona/amethyst/service/model/ReportEvent.kt @@ -60,6 +60,8 @@ class ReportEvent ( EXPLICIT, ILLEGAL, SPAM, - IMPERSONATION + IMPERSONATION, + NUDITY, + PROFANITY } } \ No newline at end of file diff --git a/app/src/main/java/com/vitorpamplona/amethyst/ui/MainActivity.kt b/app/src/main/java/com/vitorpamplona/amethyst/ui/MainActivity.kt index 3b2b81287..4601c725b 100644 --- a/app/src/main/java/com/vitorpamplona/amethyst/ui/MainActivity.kt +++ b/app/src/main/java/com/vitorpamplona/amethyst/ui/MainActivity.kt @@ -21,6 +21,7 @@ import com.vitorpamplona.amethyst.service.relays.Client import com.vitorpamplona.amethyst.ui.screen.AccountScreen import com.vitorpamplona.amethyst.ui.screen.AccountStateViewModel import com.vitorpamplona.amethyst.ui.theme.AmethystTheme +import java.util.Locale class MainActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { @@ -61,6 +62,8 @@ class MainActivity : ComponentActivity() { } Client.lenient = true + + Locale.setDefault(Locale.ENGLISH) } override fun onResume() { diff --git a/app/src/main/java/com/vitorpamplona/amethyst/ui/note/BlankNote.kt b/app/src/main/java/com/vitorpamplona/amethyst/ui/note/BlankNote.kt index 46ce73794..44f54722f 100644 --- a/app/src/main/java/com/vitorpamplona/amethyst/ui/note/BlankNote.kt +++ b/app/src/main/java/com/vitorpamplona/amethyst/ui/note/BlankNote.kt @@ -39,7 +39,7 @@ fun BlankNote(modifier: Modifier = Modifier, isQuote: Boolean = false) { horizontalArrangement = Arrangement.Center ) { Text( - text = stringResource(R.string.referenced_post_not_found), + text = stringResource(R.string.post_not_found), modifier = Modifier.padding(30.dp), color = Color.Gray, ) diff --git a/app/src/main/java/com/vitorpamplona/amethyst/ui/note/NoteCompose.kt b/app/src/main/java/com/vitorpamplona/amethyst/ui/note/NoteCompose.kt index 784ba4d6a..a86e9dfe7 100644 --- a/app/src/main/java/com/vitorpamplona/amethyst/ui/note/NoteCompose.kt +++ b/app/src/main/java/com/vitorpamplona/amethyst/ui/note/NoteCompose.kt @@ -322,6 +322,8 @@ fun NoteCompose( ReportEvent.ReportType.SPAM -> stringResource(R.string.spam) ReportEvent.ReportType.IMPERSONATION -> stringResource(R.string.impersonation) ReportEvent.ReportType.ILLEGAL -> stringResource(R.string.illegal_behavior) + ReportEvent.ReportType.NUDITY -> stringResource(R.string.nudity) + ReportEvent.ReportType.PROFANITY -> stringResource(R.string.profanity_hateful_speech) else -> stringResource(R.string.unknown) } }.joinToString(", ") diff --git a/app/src/main/java/com/vitorpamplona/amethyst/ui/note/ReplyInformation.kt b/app/src/main/java/com/vitorpamplona/amethyst/ui/note/ReplyInformation.kt index 0ce7a2411..5d64ec1ee 100644 --- a/app/src/main/java/com/vitorpamplona/amethyst/ui/note/ReplyInformation.kt +++ b/app/src/main/java/com/vitorpamplona/amethyst/ui/note/ReplyInformation.kt @@ -92,7 +92,7 @@ fun ReplyInformation(replyTo: List?, dupMentions: List?, account: Ac ) Text( - " others", + " ${stringResource(R.string.others)}", fontSize = 13.sp, color = MaterialTheme.colors.onSurface.copy(alpha = 0.32f) ) diff --git a/app/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/ProfileScreen.kt b/app/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/ProfileScreen.kt index 256cc4a5a..31d5b4a3b 100644 --- a/app/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/ProfileScreen.kt +++ b/app/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/ProfileScreen.kt @@ -829,6 +829,14 @@ fun UserProfileDropDownMenu(user: User, popupExpanded: Boolean, onDismiss: () -> }) { Text(stringResource(id = R.string.report_spam_scam)) } + DropdownMenuItem(onClick = { + accountViewModel.report(user, ReportEvent.ReportType.PROFANITY); + user.let { accountViewModel.hide(it, context) } + onDismiss() + }) { + Text(stringResource(R.string.report_hateful_speech)) + } + DropdownMenuItem(onClick = { accountViewModel.report(user, ReportEvent.ReportType.IMPERSONATION); user.let { accountViewModel.hide(it, context) } @@ -837,11 +845,11 @@ fun UserProfileDropDownMenu(user: User, popupExpanded: Boolean, onDismiss: () -> Text(stringResource(id = R.string.report_impersonation)) } DropdownMenuItem(onClick = { - accountViewModel.report(user, ReportEvent.ReportType.EXPLICIT); + accountViewModel.report(user, ReportEvent.ReportType.NUDITY); user.let { accountViewModel.hide(it, context) } onDismiss() }) { - Text(stringResource(id = R.string.report_explicit_content)) + Text(stringResource(R.string.report_nudity_porn)) } DropdownMenuItem(onClick = { accountViewModel.report(user, ReportEvent.ReportType.ILLEGAL); diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index 6e3dd152e..415d73e56 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -8,13 +8,13 @@ مسح QR عرض على أي حال تم وضع علامة على المنشور على أنه غير لائق بواسطة - المنشور المشار إليه غير موجود + المنشور غير موجود صورة القناة لم يتم العثور على الحدث المشار إليه لا يمكن فك تشفير الرسالة صورة المجموعة محتوى فاضح - زسائل عشوائية + رسائل عشوائية التمثيل تصرف غير قانوني غير معروف @@ -170,4 +170,9 @@ س د يوم + عُري + الألفاظ النابية / خطاب كراهية + أبلغ عن كلام يحض على الكراهية + الإبلاغ عن عُري / إباحي + others diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 0fc080311..012ed8bf1 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -7,7 +7,7 @@ Scan QR Show Anyway Post was flagged as inappropriate by - Referenced post not found + post not found Channel Image Referenced event not found Could Not decrypt the message @@ -172,4 +172,9 @@ h m d + Nudity + Profanity / Hateful speech + Report Hateful speech + Report Nudity / Porn + others \ No newline at end of file