fix: remove unintended change
This commit is contained in:
@ -271,7 +271,20 @@ const LoginSlice = createSlice({
|
|||||||
if (!Array.isArray(n)) {
|
if (!Array.isArray(n)) {
|
||||||
n = [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) => {
|
incDmInteraction: (state) => {
|
||||||
state.dmInteraction += 1;
|
state.dmInteraction += 1;
|
||||||
|
Reference in New Issue
Block a user