From d91c7f5e541f59134a98655df132915f05da0286 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Tue, 17 Apr 2018 16:53:11 +0100 Subject: [PATCH] Add comment about enum hijinks --- src/components/views/globals/UpdateCheckBar.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/views/globals/UpdateCheckBar.js b/src/components/views/globals/UpdateCheckBar.js index db01746340..53801311d8 100644 --- a/src/components/views/globals/UpdateCheckBar.js +++ b/src/components/views/globals/UpdateCheckBar.js @@ -23,7 +23,7 @@ import AccessibleButton from '../../../components/views/elements/AccessibleButto export default React.createClass({ propTypes: { - status: React.PropTypes.string, // oneOf(Object.values(updateCheckStatusEnum)).isRequired, + status: React.PropTypes.string.isRequired, // Currently for error detail but will be usable for download progress // once that is a thing that squirrel passes through electron. detail: React.PropTypes.string, @@ -36,6 +36,8 @@ export default React.createClass({ }, getStatusText: function() { + // we can't import the enum from riot-web as we don't want matrix-react-sdk + // to depend on riot-web. so we grab it as a normal object via API instead. const updateCheckStatusEnum = PlatformPeg.get().getUpdateCheckStatusEnum(); switch(this.props.status) { case updateCheckStatusEnum.ERROR: