Skip to content

Commit 136eb3c

Browse files
committed
doc: udpate readme
1 parent b767828 commit 136eb3c

File tree

5 files changed

+14
-11
lines changed

5 files changed

+14
-11
lines changed

README-zh_CN.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
![ghChat](https://user-images.githubusercontent.com/24861316/54087066-55783580-438a-11e9-9a5d-14288e84a3f9.png)
22

3-
Node 版本: 8.12.0
4-
Npm 版本: 6.4.1
5-
MySQL 版本: 5.7.22
3+
[![Node.js](https://img.shields.io/badge/Node.js-10.15.3-brightgreen.svg)](https://nodejs.org/en/download/)
4+
[![MySQL](https://img.shields.io/badge/MySQL-5.7.22-lightgrey.svg)](https://www.mysql.com/downloads/)
5+
[![License](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/aermin/ghChat/blob/master/LICENSE)
6+
[![Author](https://img.shields.io/badge/Author-aermin-blue.svg)](https://github.com/aermin)
67

78
[English](./README.md) | 简体中文
89

README.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
![ghChat](https://user-images.githubusercontent.com/24861316/54087066-55783580-438a-11e9-9a5d-14288e84a3f9.png)
22

3-
Node version: 8.12.0
4-
Npm version: 6.4.1
5-
MySQL version: 5.7.22
3+
4+
[![Node.js](https://img.shields.io/badge/Node.js-10.15.3-brightgreen.svg)](https://nodejs.org/en/download/)
5+
[![MySQL](https://img.shields.io/badge/MySQL-5.7.22-lightgrey.svg)](https://www.mysql.com/downloads/)
6+
[![License](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/aermin/ghChat/blob/master/LICENSE)
7+
[![Author](https://img.shields.io/badge/Author-aermin-blue.svg)](https://github.com/aermin)
68

79
English | [简体中文](./README-zh_CN.md)
810

src/components/GroupChat/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ class GroupChat extends Component {
141141
componentDidMount() {
142142
const { allGroupChats } = this.props;
143143
const chatItem = allGroupChats && allGroupChats.get(this.chatId);
144-
// (产品设计) 当查找没加过的群,点击去没群内容,请求出群内容,避免不了解而加错群
145-
if (!chatItem) {
144+
// (产品设计) 当查找没加过的群,点击去没群内容,请求出群内容,避免不了解而后悔加群
145+
if (!chatItem && window.socket) {
146146
window.socket.emit('getOneGroupItem', { groupId: this.chatId, start: 1 }, groupMsgAndInfo => {
147147
this.setState({ groupMsgAndInfo });
148148
});
@@ -179,7 +179,7 @@ class GroupChat extends Component {
179179
showShareModal,
180180
disableJoinButton,
181181
} = this.state;
182-
if (!allGroupChats && !allGroupChats.size) return null;
182+
if ((!allGroupChats && !allGroupChats.size) || !this.chatId) return null;
183183
const chatItem = allGroupChats.get(this.chatId);
184184
const messages = chatItem ? chatItem.messages : groupMsgAndInfo.messages;
185185
const groupInfo = chatItem ? chatItem.groupInfo : groupMsgAndInfo.groupInfo;

src/components/PrivateChat/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ export default class PrivateChat extends Component {
140140
initApp,
141141
} = this.props;
142142
const { showPersonalInfo, showShareModal, toUserInfo, disableJoinButton } = this.state;
143-
if (!allPrivateChats && !allPrivateChats.size) return null;
143+
if ((!allPrivateChats && !allPrivateChats.size) || !this.chatId) return null;
144144
const chatItem = allPrivateChats.get(this.chatId);
145145
const messages = chatItem ? chatItem.messages : [];
146146
const userInfo = chatItem ? chatItem.userInfo : toUserInfo;

src/components/Setting/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ function Setting({ initApp, history, globalSettings, setGlobalSettings }) {
8181
项目交流群
8282
</div>
8383
<Button clickFn={() => setLogoutModalVisible(true)} value="退出登录" />
84-
<div className="version">Version: 2.5.1</div>
84+
<div className="version">Version: 2.5.2</div>
8585
</div>
8686
);
8787
}

0 commit comments

Comments
 (0)