mirror of https://github.com/vector-im/riot-web
updating for lint issues
parent
c56d6ba539
commit
4759b4fb5d
|
@ -90,14 +90,14 @@ export default class RoomProfileSettings extends React.Component<IProps, IState>
|
||||||
avatarFile: null,
|
avatarFile: null,
|
||||||
profileFieldsTouched: {
|
profileFieldsTouched: {
|
||||||
...this.state.profileFieldsTouched,
|
...this.state.profileFieldsTouched,
|
||||||
avatar: true
|
avatar: true,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
private isSaveEnabled = () => {
|
private isSaveEnabled = () => {
|
||||||
return Boolean(Object.values(this.state.profileFieldsTouched).length)
|
return Boolean(Object.values(this.state.profileFieldsTouched).length);
|
||||||
}
|
};
|
||||||
|
|
||||||
private cancelProfileChanges = async (e: React.MouseEvent): Promise<void> => {
|
private cancelProfileChanges = async (e: React.MouseEvent): Promise<void> => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
|
@ -166,13 +166,14 @@ export default class RoomProfileSettings extends React.Component<IProps, IState>
|
||||||
this.setState({
|
this.setState({
|
||||||
profileFieldsTouched: {
|
profileFieldsTouched: {
|
||||||
...this.state.profileFieldsTouched,
|
...this.state.profileFieldsTouched,
|
||||||
name: false
|
name: false,
|
||||||
}, });
|
},
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
this.setState({
|
this.setState({
|
||||||
profileFieldsTouched: {
|
profileFieldsTouched: {
|
||||||
...this.state.profileFieldsTouched,
|
...this.state.profileFieldsTouched,
|
||||||
name: true
|
name: true,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -184,14 +185,14 @@ export default class RoomProfileSettings extends React.Component<IProps, IState>
|
||||||
this.setState({
|
this.setState({
|
||||||
profileFieldsTouched: {
|
profileFieldsTouched: {
|
||||||
...this.state.profileFieldsTouched,
|
...this.state.profileFieldsTouched,
|
||||||
topic: false
|
topic: false,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.setState({
|
this.setState({
|
||||||
profileFieldsTouched: {
|
profileFieldsTouched: {
|
||||||
...this.state.profileFieldsTouched,
|
...this.state.profileFieldsTouched,
|
||||||
topic: true
|
topic: true,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -204,7 +205,7 @@ export default class RoomProfileSettings extends React.Component<IProps, IState>
|
||||||
avatarFile: null,
|
avatarFile: null,
|
||||||
profileFieldsTouched: {
|
profileFieldsTouched: {
|
||||||
...this.state.profileFieldsTouched,
|
...this.state.profileFieldsTouched,
|
||||||
avatar: false
|
avatar: false,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
|
@ -218,7 +219,7 @@ export default class RoomProfileSettings extends React.Component<IProps, IState>
|
||||||
avatarFile: file,
|
avatarFile: file,
|
||||||
profileFieldsTouched: {
|
profileFieldsTouched: {
|
||||||
...this.state.profileFieldsTouched,
|
...this.state.profileFieldsTouched,
|
||||||
avatar: true
|
avatar: true,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue