Adds Malware Report type
This commit is contained in:
@@ -58,6 +58,7 @@ fun RenderReport(
|
|||||||
ReportEvent.ReportType.SPAM -> stringRes(R.string.spam)
|
ReportEvent.ReportType.SPAM -> stringRes(R.string.spam)
|
||||||
ReportEvent.ReportType.IMPERSONATION -> stringRes(R.string.impersonation)
|
ReportEvent.ReportType.IMPERSONATION -> stringRes(R.string.impersonation)
|
||||||
ReportEvent.ReportType.ILLEGAL -> stringRes(R.string.illegal_behavior)
|
ReportEvent.ReportType.ILLEGAL -> stringRes(R.string.illegal_behavior)
|
||||||
|
ReportEvent.ReportType.MALWARE -> stringRes(R.string.report_malware)
|
||||||
ReportEvent.ReportType.OTHER -> stringRes(R.string.other)
|
ReportEvent.ReportType.OTHER -> stringRes(R.string.other)
|
||||||
}
|
}
|
||||||
}.toSet()
|
}.toSet()
|
||||||
|
|||||||
@@ -1953,6 +1953,13 @@ fun UserProfileDropDownMenu(
|
|||||||
onDismiss()
|
onDismiss()
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
DropdownMenuItem(
|
||||||
|
text = { Text(stringRes(id = R.string.report_malware)) },
|
||||||
|
onClick = {
|
||||||
|
accountViewModel.report(user, ReportEvent.ReportType.MALWARE)
|
||||||
|
onDismiss()
|
||||||
|
},
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-4
@@ -77,12 +77,10 @@ fun ReportNoteDialog(
|
|||||||
listOf(
|
listOf(
|
||||||
Pair(ReportEvent.ReportType.SPAM, stringRes(R.string.report_dialog_spam)),
|
Pair(ReportEvent.ReportType.SPAM, stringRes(R.string.report_dialog_spam)),
|
||||||
Pair(ReportEvent.ReportType.PROFANITY, stringRes(R.string.report_dialog_profanity)),
|
Pair(ReportEvent.ReportType.PROFANITY, stringRes(R.string.report_dialog_profanity)),
|
||||||
Pair(
|
Pair(ReportEvent.ReportType.IMPERSONATION, stringRes(R.string.report_dialog_impersonation)),
|
||||||
ReportEvent.ReportType.IMPERSONATION,
|
|
||||||
stringRes(R.string.report_dialog_impersonation),
|
|
||||||
),
|
|
||||||
Pair(ReportEvent.ReportType.NUDITY, stringRes(R.string.report_dialog_nudity)),
|
Pair(ReportEvent.ReportType.NUDITY, stringRes(R.string.report_dialog_nudity)),
|
||||||
Pair(ReportEvent.ReportType.ILLEGAL, stringRes(R.string.report_dialog_illegal)),
|
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() }
|
val reasonOptions = remember { reportTypes.map { TitleExplainer(it.second) }.toImmutableList() }
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
<string name="report_impersonation">Report Impersonation</string>
|
<string name="report_impersonation">Report Impersonation</string>
|
||||||
<string name="report_explicit_content">Report Explicit Content</string>
|
<string name="report_explicit_content">Report Explicit Content</string>
|
||||||
<string name="report_illegal_behaviour">Report Illegal Behaviour</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_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_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>
|
<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_impersonation">Malicious impersonation</string>
|
||||||
<string name="report_dialog_nudity">Nudity or graphic content</string>
|
<string name="report_dialog_nudity">Nudity or graphic content</string>
|
||||||
<string name="report_dialog_illegal">Illegal Behavior</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_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_block_hide_user_btn"><![CDATA[Block & Hide User]]></string>
|
||||||
<string name="report_dialog_report_btn">Report Abuse</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.signers.NostrSigner
|
||||||
import com.vitorpamplona.quartz.utils.TimeUtils
|
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.
|
// NIP 56 event.
|
||||||
@Immutable
|
@Immutable
|
||||||
@@ -119,13 +122,14 @@ class ReportEvent(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
enum class ReportType() {
|
enum class ReportType {
|
||||||
EXPLICIT, // Not used anymore.
|
EXPLICIT, // Not used anymore.
|
||||||
ILLEGAL,
|
ILLEGAL,
|
||||||
SPAM,
|
SPAM,
|
||||||
IMPERSONATION,
|
IMPERSONATION,
|
||||||
NUDITY,
|
NUDITY,
|
||||||
PROFANITY,
|
PROFANITY,
|
||||||
|
MALWARE,
|
||||||
OTHER,
|
OTHER,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user