1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-02 07:27:04 +00:00

update group in real time (#7141)

This commit is contained in:
Jerry Ren
2024-12-04 17:49:42 +08:00
committed by GitHub
parent 3a4db4bf70
commit 90764f9520
12 changed files with 305 additions and 75 deletions

View File

@@ -18,6 +18,8 @@ import FilesSubNav from '../components/files-sub-nav';
import { SUB_NAV_ITEM_HEIGHT } from '../constants';
import { isWorkWeixin } from './wechat/weixin-utils';
import WechatDialog from './wechat/wechat-dialog';
import { EVENT_BUS_TYPE } from './common/event-bus-type';
import EventBus from './common/event-bus';
const propTypes = {
currentTab: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
@@ -26,6 +28,7 @@ const propTypes = {
};
class MainSideNav extends React.Component {
constructor(props) {
super(props);
@@ -93,6 +96,10 @@ class MainSideNav extends React.Component {
const { groupItems: newList } = this.state;
newList.push(newGroup);
this.filesNavHeight += SUB_NAV_ITEM_HEIGHT;
const eventBus = EventBus.getInstance();
eventBus.dispatch(EVENT_BUS_TYPE.ADD_NEW_GROUP, { group: newGroup });
this.setState({
groupItems: newList
});