Commit bcdfe30
committed
Fix timeline poll not removing deleted recordings (#331)
The pollForNewRecordings function had two bugs:
1. It returned early when polledSegments was empty, so deleting all
recordings in a time range would never clear the timeline.
2. It only detected additions (addedSegs) and never removals, so any
deleted recording would remain visible until a full page reload.
Fix: compute removedSegs by diffing current IDs against polled IDs.
When either additions or removals are detected, replace the displayed
segments with the authoritative polled list (sorted). Show a toast
notification for removals in the same style as the existing additions
notification.1 parent 4362552 commit bcdfe30
1 file changed
Lines changed: 16 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
944 | 944 | | |
945 | 945 | | |
946 | 946 | | |
947 | | - | |
948 | 947 | | |
949 | 948 | | |
950 | 949 | | |
| 950 | + | |
951 | 951 | | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
952 | 960 | | |
953 | 961 | | |
954 | | - | |
955 | | - | |
956 | | - | |
957 | 962 | | |
958 | 963 | | |
959 | 964 | | |
960 | 965 | | |
961 | 966 | | |
962 | 967 | | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
963 | 975 | | |
964 | 976 | | |
965 | 977 | | |
| |||
0 commit comments