resolve conflicts

This commit is contained in:
Rashed
2023-03-01 10:10:27 +03:00
parent 67e6349877
commit 855b2ff5b1
9 changed files with 34 additions and 9 deletions
@@ -60,6 +60,8 @@ class ReportEvent (
EXPLICIT,
ILLEGAL,
SPAM,
IMPERSONATION
IMPERSONATION,
NUDITY,
PROFANITY
}
}
@@ -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() {
@@ -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,
)
@@ -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(", ")
@@ -92,7 +92,7 @@ fun ReplyInformation(replyTo: List<Note>?, dupMentions: List<User>?, account: Ac
)
Text(
" others",
" ${stringResource(R.string.others)}",
fontSize = 13.sp,
color = MaterialTheme.colors.onSurface.copy(alpha = 0.32f)
)
@@ -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);