Remove leftover function binding usages
Some checks failed
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint Pipeline failed
ci/woodpecker/push/tests Pipeline failed

This commit is contained in:
Sonny Bakker 2025-03-27 21:44:21 +01:00
parent 1a54fdbcd1
commit b465d0bb8d
2 changed files with 2 additions and 5 deletions

View file

@ -3,9 +3,7 @@ import React from 'react';
class Messages extends React.Component { class Messages extends React.Component {
state = { messages: this.props.messages }; state = { messages: this.props.messages };
close = ::this.close; close = (index) => {
close(index) {
const newMessages = this.state.messages.filter((message, currentIndex) => { const newMessages = this.state.messages.filter((message, currentIndex) => {
return currentIndex != index; return currentIndex != index;
}); });

View file

@ -7,7 +7,6 @@ import { SAVED_TYPE, SUBREDDIT } from '../constants.js';
import { formatDatetime } from '../../../utils.js'; import { formatDatetime } from '../../../utils.js';
class PostModal extends React.Component { class PostModal extends React.Component {
modalListener = ::this.modalListener;
readTimer = null; readTimer = null;
componentDidMount() { componentDidMount() {
@ -32,7 +31,7 @@ class PostModal extends React.Component {
window.removeEventListener('click', this.modalListener); window.removeEventListener('click', this.modalListener);
} }
modalListener(e) { modalListener = (e) => {
const targetClassName = e.target.className; const targetClassName = e.target.className;
if (this.props.post && targetClassName == 'modal post-modal') { if (this.props.post && targetClassName == 'modal post-modal') {