mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-04-01 00:18:30 +02:00
Adds Malware Report type
This commit is contained in:
parent
01816b0389
commit
7519fc2f10
@ -58,6 +58,7 @@ fun RenderReport(
|
||||
ReportEvent.ReportType.SPAM -> stringRes(R.string.spam)
|
||||
ReportEvent.ReportType.IMPERSONATION -> stringRes(R.string.impersonation)
|
||||
ReportEvent.ReportType.ILLEGAL -> stringRes(R.string.illegal_behavior)
|
||||
ReportEvent.ReportType.MALWARE -> stringRes(R.string.report_malware)
|
||||
ReportEvent.ReportType.OTHER -> stringRes(R.string.other)
|
||||
}
|
||||
}.toSet()
|
||||
|
@ -1953,6 +1953,13 @@ fun UserProfileDropDownMenu(
|
||||
onDismiss()
|
||||
},
|
||||
)
|
||||
DropdownMenuItem(
|
||||
text = { Text(stringRes(id = R.string.report_malware)) },
|
||||
onClick = {
|
||||
accountViewModel.report(user, ReportEvent.ReportType.MALWARE)
|
||||
onDismiss()
|
||||
},
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -77,12 +77,10 @@ fun ReportNoteDialog(
|
||||
listOf(
|
||||
Pair(ReportEvent.ReportType.SPAM, stringRes(R.string.report_dialog_spam)),
|
||||
Pair(ReportEvent.ReportType.PROFANITY, stringRes(R.string.report_dialog_profanity)),
|
||||
Pair(
|
||||
ReportEvent.ReportType.IMPERSONATION,
|
||||
stringRes(R.string.report_dialog_impersonation),
|
||||
),
|
||||
Pair(ReportEvent.ReportType.IMPERSONATION, stringRes(R.string.report_dialog_impersonation)),
|
||||
Pair(ReportEvent.ReportType.NUDITY, stringRes(R.string.report_dialog_nudity)),
|
||||
Pair(ReportEvent.ReportType.ILLEGAL, stringRes(R.string.report_dialog_illegal)),
|
||||
Pair(ReportEvent.ReportType.MALWARE, stringRes(R.string.report_malware)),
|
||||
)
|
||||
|
||||
val reasonOptions = remember { reportTypes.map { TitleExplainer(it.second) }.toImmutableList() }
|
||||
|
@ -37,6 +37,7 @@
|
||||
<string name="report_impersonation">Report Impersonation</string>
|
||||
<string name="report_explicit_content">Report Explicit Content</string>
|
||||
<string name="report_illegal_behaviour">Report Illegal Behaviour</string>
|
||||
<string name="report_malware">Report Malware</string>
|
||||
<string name="login_with_a_private_key_to_be_able_to_reply">You are using a public key and public keys are read-only. Login with a Private key to be able to reply</string>
|
||||
<string name="login_with_a_private_key_to_be_able_to_boost_posts">You are using a public key and public keys are read-only. Login with a Private key to be able to boost posts</string>
|
||||
<string name="login_with_a_private_key_to_like_posts">You are using a public key and public keys are read-only. Login with a Private key to like posts</string>
|
||||
@ -283,6 +284,7 @@
|
||||
<string name="report_dialog_impersonation">Malicious impersonation</string>
|
||||
<string name="report_dialog_nudity">Nudity or graphic content</string>
|
||||
<string name="report_dialog_illegal">Illegal Behavior</string>
|
||||
<string name="report_dialog_malware">Malware</string>
|
||||
<string name="report_dialog_blocking_a_user">Blocking a user will hide their content in your app. Your notes are still publicly viewable, including to people you block. Blocked users are listed on the Security Filters screen.</string>
|
||||
<string name="report_dialog_block_hide_user_btn"><![CDATA[Block & Hide User]]></string>
|
||||
<string name="report_dialog_report_btn">Report Abuse</string>
|
||||
|
@ -25,7 +25,10 @@ import com.vitorpamplona.quartz.encoders.HexKey
|
||||
import com.vitorpamplona.quartz.signers.NostrSigner
|
||||
import com.vitorpamplona.quartz.utils.TimeUtils
|
||||
|
||||
@Immutable data class ReportedKey(val key: String, val reportType: ReportEvent.ReportType)
|
||||
@Immutable data class ReportedKey(
|
||||
val key: String,
|
||||
val reportType: ReportEvent.ReportType,
|
||||
)
|
||||
|
||||
// NIP 56 event.
|
||||
@Immutable
|
||||
@ -119,13 +122,14 @@ class ReportEvent(
|
||||
}
|
||||
}
|
||||
|
||||
enum class ReportType() {
|
||||
enum class ReportType {
|
||||
EXPLICIT, // Not used anymore.
|
||||
ILLEGAL,
|
||||
SPAM,
|
||||
IMPERSONATION,
|
||||
NUDITY,
|
||||
PROFANITY,
|
||||
MALWARE,
|
||||
OTHER,
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user