diff options
| author | Hazelnoot <acomputerdog@gmail.com> | 2025-05-30 12:57:52 -0400 |
|---|---|---|
| committer | Hazelnoot <acomputerdog@gmail.com> | 2025-06-04 10:48:24 -0400 |
| commit | 2536768133a716c0a5f45ee7ef7e0694b907a205 (patch) | |
| tree | 75f07c8b079e64b16250e082a409bd04a2efc4eb /packages/frontend/src | |
| parent | factor out getNoteUrls function (diff) | |
| download | sharkey-2536768133a716c0a5f45ee7ef7e0694b907a205.tar.gz sharkey-2536768133a716c0a5f45ee7ef7e0694b907a205.tar.bz2 sharkey-2536768133a716c0a5f45ee7ef7e0694b907a205.zip | |
check for note in initial de-duplication pass
Diffstat (limited to 'packages/frontend/src')
| -rw-r--r-- | packages/frontend/src/components/SkUrlPreviewGroup.vue | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/packages/frontend/src/components/SkUrlPreviewGroup.vue b/packages/frontend/src/components/SkUrlPreviewGroup.vue index 4c43c989bd..beba20f783 100644 --- a/packages/frontend/src/components/SkUrlPreviewGroup.vue +++ b/packages/frontend/src/components/SkUrlPreviewGroup.vue @@ -207,9 +207,13 @@ function deduplicatePreviews(previews: Summary[]): Summary[] { // Skip if we have AP and the other doesn't if (preview.activityPub && !p.activityPub) return false; + // Skip if we have a note and the other doesn't + if (preview.note && !p.note) return false; + // Skip later previews (keep the earliest instance)... - // ...but only if we have AP or the later one doesn't. - if (i > index && (preview.activityPub || !p.activityPub)) return false; + // ...but only if we have AP or the later one doesn't... + // ...and only if we have note or the later one doesn't. + if (i > index && (preview.activityPub || !p.activityPub) && (preview.note || !p.note)) return false; // If we get here, then "preview" is a duplicate of "p" and should be skipped. return true; |