Skip to content

Commit 26353f1

Browse files
committed
update demo and fix bug
1 parent 170045e commit 26353f1

File tree

13 files changed

+26
-14
lines changed

13 files changed

+26
-14
lines changed

example/src/demo2/Client/LoginAndLogout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export class LoginAndLogoutScreen extends Component<
3434
this.state = {
3535
connectStatus: '...',
3636
listenerStatus: '...',
37-
useName: datasheet.accounts[8].id,
37+
useName: datasheet.accounts[0].id,
3838
password: datasheet.accounts[0].mm,
3939
};
4040
}

example/src/demo2/Test/QuickTestChat.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ export class QuickTestScreenChat extends QuickTestScreenBase<
220220
* @param name 方法名称
221221
*/
222222
protected callApi(name: string): void {
223+
super.callApi(name);
223224
switch (name) {
224225
case MN.sendMessage:
225226
{

example/src/demo2/Test/QuickTestContact.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ export class QuickTestScreenContact extends QuickTestScreenBase<
112112
* @param name 方法名称
113113
*/
114114
protected callApi(name: string): void {
115+
super.callApi(name);
115116
switch (name) {
116117
case MN.addContact:
117118
{

example/src/demo2/Test/QuickTestGroup.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ export class QuickTestScreenGroup extends QuickTestScreenBase<
9898
* @param name 方法名称
9999
*/
100100
protected callApi(name: string): void {
101+
super.callApi(name);
101102
switch (name) {
102103
case MN.getGroupWithId:
103104
{
@@ -442,13 +443,13 @@ export class QuickTestScreenGroup extends QuickTestScreenBase<
442443
console.log(`${MN.changeGroupName} === ${methodName}`);
443444
const groupId = this.metaData.get(MN.changeGroupName)?.params[0]
444445
.paramDefaultValue;
445-
const name = this.metaData.get(MN.changeGroupName)?.params[1]
446+
const local_name = this.metaData.get(MN.changeGroupName)?.params[1]
446447
.paramDefaultValue;
447448

448449
this.tryCatch(
449450
ChatClient.getInstance().groupManager.changeGroupName(
450451
groupId,
451-
name
452+
local_name
452453
),
453454
QuickTestScreenGroup.TAG,
454455
methodName

example/src/demo2/Test/QuickTestPresence.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ export class QuickTestScreenPresence extends QuickTestScreenBase<
6767
* @param name 方法名称
6868
*/
6969
protected callApi(name: string): void {
70+
super.callApi(name);
7071
switch (name) {
7172
case MN.publishPresenceWithDescription:
7273
{

example/src/demo2/Test/QuickTestPresenceData.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export const metaDataList = new Map<string, ApiParams>([
3030
{
3131
paramName: 'members',
3232
paramType: 'object',
33-
paramDefaultValue: ['zhangsan', 'lisi'],
33+
paramDefaultValue: ['asterisk003'],
3434
},
3535
{
3636
paramName: 'expiry',

example/src/demo2/Test/QuickTestRoom.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ export class QuickTestScreenRoom extends QuickTestScreenBase<
6161
* @param name 方法名称
6262
*/
6363
protected callApi(name: string): void {
64+
super.callApi(name);
6465
switch (name) {
6566
case MN.joinChatRoom:
6667
{

example/src/demo2/Test/QuickTestScreenBase.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -924,10 +924,11 @@ export abstract class QuickTestScreenBase<
924924
}
925925

926926
/**
927-
* 调用对应的SDK方法
927+
* 子类需要调用该方法
928+
*
928929
* @param name 方法名称
929930
*/
930931
protected callApi(name: string): void {
931-
throw new Error('Please sub class implement. ' + name);
932+
this.setState({ cmd: name });
932933
}
933934
}

example/src/demo2/Test/QuickTestUser.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ export class QuickTestScreenUser extends QuickTestScreenBase<
6060
* @param name 方法名称
6161
*/
6262
protected callApi(name: string): void {
63+
super.callApi(name);
6364
switch (name) {
6465
case MN.updateOwnUserInfo:
6566
{

native_src/java

0 commit comments

Comments
 (0)