mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-31 01:42:27 +00:00
feat: enable dynamic comment loading and sorting
This commit is contained in:
1 parent
771a748530
commit
41ff140982
4 files changed
+44
-6
No files matched your search
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user