fix: remove unintended change

This commit is contained in:
Alejandro Gomez 2023-01-28 12:57:09 +01:00
parent 456aa5fb79
commit e245a3931b
No known key found for this signature in database
GPG Key ID: 4DF39E566658C817

View File

@ -271,7 +271,20 @@ const LoginSlice = createSlice({
if (!Array.isArray(n)) {
n = [n];
}
state.dms = n;
let didChange = false;
for (let x of n) {
if (!state.dms.some(a => a.id === x.id)) {
state.dms.push(x);
didChange = true;
}
}
if (didChange) {
state.dms = [
...state.dms
];
}
},
incDmInteraction: (state) => {
state.dmInteraction += 1;