Client: Fix blinking group header in row view

This commit is contained in:
Aleksandr Lushkin 2024-03-13 17:52:19 +01:00
parent edabac22f9
commit 4edcb51bc1

View File

@ -18,14 +18,11 @@ const GroupsRow = ({
setSelection,
bufferSelection,
setBufferSelection,
setCurrentGroup,
getGroupContextOptions,
sectionWidth,
theme,
setInsideGroupBackUrl,
openGroupAction,
}) => {
const navigate = useNavigate();
const isChecked = selection.some((el) => el.id === item.id);
const isActive = bufferSelection?.id === item?.id;
@ -54,12 +51,7 @@ const GroupsRow = ({
const onOpenGroup = () => {
setSelection([]);
setBufferSelection(null);
setCurrentGroup(null);
setInsideGroupBackUrl(
`${window.location.pathname}${window.location.search}`,
);
navigate(`/accounts/groups/${item.id}/filter`);
openGroupAction(item.id, true, item.name);
};
const nameColor =
@ -162,9 +154,8 @@ export default inject(({ peopleStore, settingsStore }) => ({
setSelection: peopleStore.groupsStore.setSelection,
bufferSelection: peopleStore.groupsStore.bufferSelection,
setBufferSelection: peopleStore.groupsStore.setBufferSelection,
setCurrentGroup: peopleStore.groupsStore.setCurrentGroup,
getGroupContextOptions: peopleStore.groupsStore.getGroupContextOptions,
setInsideGroupBackUrl: peopleStore.groupsStore.setInsideGroupBackUrl,
openGroupAction: peopleStore.groupsStore.openGroupAction,
theme: settingsStore.theme,
}))(
withTranslation(