remove reconnect action

dont init quickreply if element doesnt exist aka guests
This commit is contained in:
Barış Soner Uşaklı
2026-02-22 21:31:50 -05:00
parent 41ef71fa96
commit 835d16e59f
2 changed files with 4 additions and 14 deletions

View File

@@ -87,15 +87,6 @@ ajaxify.widgets = { render: render };
// Automatically reconnect to socket and re-ajaxify on success
if (!socket.connected && parseInt(app.user.uid, 10) >= 0) {
app.reconnect();
if (ajaxify.reconnectAction) {
$(window).off('action:reconnected', ajaxify.reconnectAction);
}
ajaxify.reconnectAction = function (e) {
ajaxify.go(url, callback, quiet);
$(window).off(e);
};
$(window).on('action:reconnected', ajaxify.reconnectAction);
}
// Abort subsequent requests if clicked multiple times within a short window of time
@@ -341,11 +332,6 @@ ajaxify.widgets = { render: render };
}
ajaxify.end = function (url, tpl_url) {
// Cancel reconnectAction if there was one pending, since ajaxify was a success
if (ajaxify.reconnectAction) {
$(window).off('action:reconnected', ajaxify.reconnectAction);
}
// Scroll back to top of page
if (!ajaxify.isCold()) {
window.scrollTo(0, 0);

View File

@@ -13,6 +13,10 @@ define('quickreply', [
QuickReply.init = function (opts) {
const element = components.get('topic/quickreply/text');
if (!element.length) {
return;
}
const qrDraftId = ajaxify.data.tid ? `qr:draft:tid:${ajaxify.data.tid}` : `qr:draft:cid:${opts?.body?.cid || -1}`;
const data = {
element: element,