mirror of
https://github.com/block/buzz.git
synced 2026-11-02 15:31:27 +00:00
fix(mobile/ios): retain exact active-second push history
Co-authored-by: npub1tquskdu6yc4h8l7xxtceculxw600grekeq0xg2ukqfrwl7vrzg3quz3gmp <58390b379a262b73ffc632f19c73e6769ef40f36c81e642b960246eff9831222@buzz.block.builderlab.xyz> Signed-off-by: npub1tquskdu6yc4h8l7xxtceculxw600grekeq0xg2ukqfrwl7vrzg3quz3gmp <58390b379a262b73ffc632f19c73e6769ef40f36c81e642b960246eff9831222@buzz.block.builderlab.xyz>
This commit is contained in:
parent
a255c4e399
commit
b3dd7e91a4
@@ -100,8 +100,13 @@ public enum PushCatchUp {
|
||||
guard consumptionState.canSelect(position, for: origin) else { return nil }
|
||||
return PushCatchUpSelection(event: event, wasPreviouslyConsumed: false)
|
||||
}
|
||||
let duplicateFallbackID = consumptionState.state(for: origin).lastDisplayed?.id
|
||||
let duplicates = ordered.compactMap { event -> PushCatchUpSelection? in
|
||||
guard consumptionState.hasConsumed(eventID: event.id, for: origin) else { return nil }
|
||||
guard event.id == duplicateFallbackID,
|
||||
consumptionState.hasConsumed(eventID: event.id, for: origin)
|
||||
else {
|
||||
return nil
|
||||
}
|
||||
return PushCatchUpSelection(event: event, wasPreviouslyConsumed: true)
|
||||
}
|
||||
return selectable + duplicates
|
||||
|
||||
Reference in New Issue
Block a user