Move space shortcut from roomlist to accountdata
Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
@@ -79,7 +79,7 @@ function useTotalInvites() {
|
||||
}
|
||||
|
||||
function SideBar() {
|
||||
const { roomList, notifications } = initMatrix;
|
||||
const { roomList, accountData, notifications } = initMatrix;
|
||||
const mx = initMatrix.matrixClient;
|
||||
|
||||
const [selectedTab] = useSelectedTab();
|
||||
@@ -112,7 +112,7 @@ function SideBar() {
|
||||
let noti = null;
|
||||
|
||||
orphans.forEach((roomId) => {
|
||||
if (roomList.spaceShortcut.has(roomId)) return;
|
||||
if (accountData.spaceShortcut.has(roomId)) return;
|
||||
if (!notifications.hasNoti(roomId)) return;
|
||||
if (noti === null) noti = { total: 0, highlight: 0 };
|
||||
const childNoti = notifications.getNoti(roomId);
|
||||
|
||||
@@ -7,7 +7,8 @@ import { twemojify } from '../../../util/twemojify';
|
||||
import initMatrix from '../../../client/initMatrix';
|
||||
import cons from '../../../client/state/cons';
|
||||
import navigation from '../../../client/state/navigation';
|
||||
import { leave, createSpaceShortcut, deleteSpaceShortcut } from '../../../client/action/room';
|
||||
import { leave } from '../../../client/action/room';
|
||||
import { createSpaceShortcut, deleteSpaceShortcut } from '../../../client/action/accountData';
|
||||
|
||||
import Text from '../../atoms/text/Text';
|
||||
import IconButton from '../../atoms/button/IconButton';
|
||||
@@ -51,7 +52,7 @@ const tabItems = [{
|
||||
}];
|
||||
|
||||
function GeneralSettings({ roomId }) {
|
||||
const isPinned = initMatrix.roomList.spaceShortcut.has(roomId);
|
||||
const isPinned = initMatrix.accountData.spaceShortcut.has(roomId);
|
||||
const [, forceUpdate] = useForceUpdate();
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user