DEV: Get rid of old chat TODOs (#22324)
These are all well-known things we need to deal with (e.g. scrolling and granular read in thread panel) or just unnecessary to keep around.
This commit is contained in:
parent
41ebbab4ff
commit
c4c566846d
|
@ -674,8 +674,6 @@ export default class ChatLivePane extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// TODO (martin) Maybe change this to public, since its referred to by
|
||||
// livePanel.linkedComponent at the moment.
|
||||
get _selfDeleted() {
|
||||
return this.isDestroying || this.isDestroyed;
|
||||
}
|
||||
|
|
|
@ -63,8 +63,6 @@ export default class ChatThreadPanel extends Component {
|
|||
this.chatThreadPaneSubscriptionsManager.unsubscribe();
|
||||
}
|
||||
|
||||
// TODO (martin) This needs to have the extended scroll/message visibility/
|
||||
// mark read behaviour the same as the channel.
|
||||
@action
|
||||
computeScrollState() {
|
||||
cancel(this.onScrollEndedHandler);
|
||||
|
@ -115,7 +113,7 @@ export default class ChatThreadPanel extends Component {
|
|||
return;
|
||||
}
|
||||
|
||||
// TODO (martin) HACK: We don't have proper scroll visibility over
|
||||
// HACK: We don't have proper scroll visibility over
|
||||
// what message we are looking at, don't have the lastReadMessageId
|
||||
// for the thread, and this updateLastReadMessage function is only
|
||||
// called when scrolling all the way to the bottom.
|
||||
|
|
|
@ -321,7 +321,6 @@ export default class ChatApi extends Service {
|
|||
* @returns {Promise}
|
||||
*/
|
||||
saveDraft(channelId, data) {
|
||||
// TODO (martin) Change this to postRequest after moving DraftsController into Api::DraftsController
|
||||
return ajax("/chat/drafts", {
|
||||
type: "POST",
|
||||
data: {
|
||||
|
@ -351,7 +350,6 @@ export default class ChatApi extends Service {
|
|||
* @returns {Promise}
|
||||
*/
|
||||
publishReaction(channelId, messageId, emoji, reactAction) {
|
||||
// TODO (martin) Not ideal, this should have a chat API controller endpoint.
|
||||
return ajax(`/chat/${channelId}/react/${messageId}`, {
|
||||
type: "PUT",
|
||||
data: {
|
||||
|
@ -380,7 +378,6 @@ export default class ChatApi extends Service {
|
|||
* @param {number} messageId - The ID of the message being restored.
|
||||
*/
|
||||
rebakeMessage(channelId, messageId) {
|
||||
// TODO (martin) Not ideal, this should have a chat API controller endpoint.
|
||||
return ajax(`/chat/${channelId}/${messageId}/rebake`, {
|
||||
type: "PUT",
|
||||
});
|
||||
|
@ -396,7 +393,6 @@ export default class ChatApi extends Service {
|
|||
* @param {Array<number>} data.upload_ids - The uploads attached to the message after editing.
|
||||
*/
|
||||
editMessage(channelId, messageId, data) {
|
||||
// TODO (martin) Not ideal, this should have a chat API controller endpoint.
|
||||
return ajax(`/chat/${channelId}/edit/${messageId}`, {
|
||||
type: "PUT",
|
||||
data,
|
||||
|
|
|
@ -14,9 +14,6 @@ export default class ChatChannelPaneSubscriptionsManager extends ChatPaneBaseSub
|
|||
return this.model.channelMessageBusLastId;
|
||||
}
|
||||
|
||||
// TODO (martin) Implement this for the channel, since it involves a bunch
|
||||
// of scrolling and pane-specific logic. Will leave the existing sub inside
|
||||
// ChatLivePane for now.
|
||||
handleSentMessage() {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -4,8 +4,6 @@ import ChatMessageMentionWarning from "discourse/plugins/chat/discourse/models/c
|
|||
import { cloneJSON } from "discourse-common/lib/object";
|
||||
import { bind } from "discourse-common/utils/decorators";
|
||||
|
||||
// TODO (martin) This export can be removed once we move the handleSentMessage
|
||||
// code completely out of ChatLivePane
|
||||
export function handleStagedMessage(channel, messagesManager, data) {
|
||||
const stagedMessage = messagesManager.findStagedMessage(data.staged_id);
|
||||
|
||||
|
@ -72,8 +70,6 @@ export default class ChatPaneBaseSubscriptionsManager extends Service {
|
|||
this.model = null;
|
||||
}
|
||||
|
||||
// TODO (martin) This can be removed once we move the handleSentMessage
|
||||
// code completely out of ChatLivePane
|
||||
handleStagedMessageInternal(channel, data) {
|
||||
return handleStagedMessage(channel, this.messagesManager, data);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue