mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-10-09 21:52:32 +02:00
Simple refactoring
This commit is contained in:
@@ -111,12 +111,10 @@ class NotificationSummaryState(
|
|||||||
takenIntoAccount.add(noteEvent.id)
|
takenIntoAccount.add(noteEvent.id)
|
||||||
}
|
}
|
||||||
} else if (noteEvent is LnZapEvent) {
|
} else if (noteEvent is LnZapEvent) {
|
||||||
if (
|
// the user might be sending his own receipts noteEvent.pubKey != currentUser
|
||||||
noteEvent.isTaggedUser(currentUser)
|
if (noteEvent.isTaggedUser(currentUser)) {
|
||||||
) { // the user might be sending his own receipts noteEvent.pubKey != currentUser
|
|
||||||
val netDate = formatDate(noteEvent.createdAt)
|
val netDate = formatDate(noteEvent.createdAt)
|
||||||
zaps[netDate] =
|
zaps[netDate] = (zaps[netDate] ?: BigDecimal.ZERO) + (noteEvent.amount ?: BigDecimal.ZERO)
|
||||||
(zaps[netDate] ?: BigDecimal.ZERO) + (noteEvent.amount ?: BigDecimal.ZERO)
|
|
||||||
takenIntoAccount.add(noteEvent.id)
|
takenIntoAccount.add(noteEvent.id)
|
||||||
}
|
}
|
||||||
} else if (noteEvent is BaseThreadedEvent) {
|
} else if (noteEvent is BaseThreadedEvent) {
|
||||||
@@ -178,12 +176,10 @@ class NotificationSummaryState(
|
|||||||
hasNewElements = true
|
hasNewElements = true
|
||||||
}
|
}
|
||||||
} else if (noteEvent is LnZapEvent) {
|
} else if (noteEvent is LnZapEvent) {
|
||||||
if (
|
if (noteEvent.isTaggedUser(currentUser)) {
|
||||||
noteEvent.isTaggedUser(currentUser)
|
// && noteEvent.pubKey != currentUser User might be sending his own receipts
|
||||||
) { // && noteEvent.pubKey != currentUser User might be sending his own receipts
|
|
||||||
val netDate = formatDate(noteEvent.createdAt)
|
val netDate = formatDate(noteEvent.createdAt)
|
||||||
zaps[netDate] =
|
zaps[netDate] = (zaps[netDate] ?: BigDecimal.ZERO) + (noteEvent.amount ?: BigDecimal.ZERO)
|
||||||
(zaps[netDate] ?: BigDecimal.ZERO) + (noteEvent.amount ?: BigDecimal.ZERO)
|
|
||||||
takenIntoAccount.add(noteEvent.id)
|
takenIntoAccount.add(noteEvent.id)
|
||||||
hasNewElements = true
|
hasNewElements = true
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user