Move message key generation to State.addMessage

This commit is contained in:
Simon Ser 2021-06-11 10:58:09 +02:00
parent c05dcffa7a
commit d19f127952
2 changed files with 4 additions and 5 deletions

View file

@ -45,8 +45,6 @@ const configPromise = fetch("./config.json")
const CHATHISTORY_MAX_SIZE = 4000;
let messagesCount = 0;
function parseQueryString() {
let query = window.location.search.substring(1);
let params = {};
@ -348,9 +346,6 @@ export default class App extends Component {
addMessage(serverID, bufName, msg) {
let client = this.clients.get(serverID);
msg.key = messagesCount;
messagesCount++;
msg.isHighlight = irc.isHighlight(msg, client.nick, client.cm);
if (!msg.tags) {