feat: enable dynamic comment loading and sorting

This commit is contained in:
google-labs-jules[bot] committed 2026-01-07 03:03:46 +00:00
1 parent 771a748530
commit 41ff140982
4 files changed
+44 -6

No files matched your search

+4 -3
View File
@@ -603,18 +603,19 @@ export default class CommentThreadService {
});
}
startSubscription(target) {
startSubscription(target, options = {}) {
if (typeof this.subscribeVideoComments !== "function") {
return;
}
const options = {
const subOptions = {
...options,
relays: this.activeRelays,
onEvent: (event) => this.processIncomingEvent(event),
};
try {
const cleanup = this.subscribeVideoComments(target, options);
const cleanup = this.subscribeVideoComments(target, subOptions);
if (typeof cleanup === "function") {
this.subscriptionCleanup = () => {
try {