mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-06 12:52:26 +00:00
Refactor video modal comment handling into controller
This commit is contained in:
1 parent
0d0dab5286
commit
11479e28e2
4 files changed
+708
-523
No files matched your search
@@ -387,26 +387,6 @@ export default class ApplicationBootstrap {
|
||||
warn: (...args) => devLogger.warn(...args),
|
||||
},
|
||||
});
|
||||
app.boundCommentThreadReadyHandler = (snapshot) =>
|
||||
app.handleCommentThreadReady(snapshot);
|
||||
app.boundCommentThreadAppendHandler = (payload) =>
|
||||
app.handleCommentThreadAppend(payload);
|
||||
app.boundCommentThreadErrorHandler = (error) =>
|
||||
app.handleCommentThreadError(error);
|
||||
if (
|
||||
app.commentThreadService &&
|
||||
typeof app.commentThreadService.setCallbacks === "function"
|
||||
) {
|
||||
app.commentThreadService.setCallbacks({
|
||||
onThreadReady: app.boundCommentThreadReadyHandler,
|
||||
onCommentsAppended: app.boundCommentThreadAppendHandler,
|
||||
onError: app.boundCommentThreadErrorHandler,
|
||||
});
|
||||
if (app.commentThreadService.defaultLimit) {
|
||||
app.modalCommentLimit = app.commentThreadService.defaultLimit;
|
||||
}
|
||||
}
|
||||
|
||||
app.profileController = null;
|
||||
app.loginModalController = null;
|
||||
app.currentUserNpub = null;
|
||||
|
||||
Reference in new issue
Block a user