Only adds a report if it doesn't already exist in the database
This commit is contained in:
@@ -132,7 +132,7 @@ class Note(val idHex: String) {
|
||||
if (author !in reports.keys) {
|
||||
reports = reports + Pair(author, setOf(note))
|
||||
liveReports.invalidateData()
|
||||
} else {
|
||||
} else if (reports[author]?.contains(note) == false) {
|
||||
reports = reports + Pair(author, (reports[author] ?: emptySet()) + note)
|
||||
liveReports.invalidateData()
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ class User(val pubkeyHex: String) {
|
||||
if (author !in reports.keys) {
|
||||
reports = reports + Pair(author, setOf(note))
|
||||
liveReports.invalidateData()
|
||||
} else {
|
||||
} else if (reports[author]?.contains(note) == false) {
|
||||
reports = reports + Pair(author, (reports[author] ?: emptySet()) + note)
|
||||
liveReports.invalidateData()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user