diff --git a/static/app-strings.json b/static/app-strings.json index 61bdbd0bd..6576939b8 100644 --- a/static/app-strings.json +++ b/static/app-strings.json @@ -2312,7 +2312,5 @@ "Free --[legend, unused disk space]--": "Free", "Top content in %language%": "Top content in %language%", "Apply": "Apply", - "24-hour clock": "24-hour clock", - "Disable background": "Disable background", "--end--": "--end--" } diff --git a/ui/component/channelThumbnail/view.jsx b/ui/component/channelThumbnail/view.jsx index b1c8e8e1d..cc293a458 100644 --- a/ui/component/channelThumbnail/view.jsx +++ b/ui/component/channelThumbnail/view.jsx @@ -50,7 +50,6 @@ function ChannelThumbnail(props: Props) { setThumbUploadError, ThumbUploadError, } = props; - const [retries, setRetries] = React.useState(3); const [thumbLoadError, setThumbLoadError] = React.useState(ThumbUploadError); const shouldResolve = !isResolving && claim === undefined; const thumbnail = rawThumbnail && rawThumbnail.trim().replace(/^http:\/\//i, 'https://'); @@ -59,15 +58,6 @@ function ChannelThumbnail(props: Props) { const channelThumbnail = thumbnailPreview || thumbnail || defaultAvatar; const isGif = channelThumbnail && channelThumbnail.endsWith('gif'); const showThumb = (!obscure && !!thumbnail) || thumbnailPreview; - const avatarSrc = React.useMemo(() => { - if (retries <= 0) { - return defaultAvatar; - } - if (!thumbLoadError) { - return channelThumbnail; - } - return defaultAvatar; - }, [retries, thumbLoadError, channelThumbnail, defaultAvatar]); // Generate a random color class based on the first letter of the channel name const { channelName } = parseURI(uri); @@ -110,10 +100,9 @@ function ChannelThumbnail(props: Props) { { - setRetries((retries) => retries - 1); if (setThumbUploadError) { setThumbUploadError(true); } else { diff --git a/ui/component/common/file-selector.jsx b/ui/component/common/file-selector.jsx index bd1729d31..fda7b11d7 100644 --- a/ui/component/common/file-selector.jsx +++ b/ui/component/common/file-selector.jsx @@ -47,24 +47,7 @@ class FileSelector extends React.PureComponent { }; handleDirectoryInputSelection = () => { - let defaultPath; - let properties; - let isWin = process.platform === 'win32'; - let type = this.props.type; - - if (isWin === true) { - defaultPath = process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE; - } - - if (type === 'openFile') { - properties = ['openFile']; - } - - if (type === 'openDirectory') { - properties = ['openDirectory']; - } - - remote.dialog.showOpenDialog({ properties, defaultPath }).then((result) => { + remote.dialog.showOpenDialog({ properties: ['openDirectory'] }).then((result) => { const path = result && result.filePaths[0]; if (path) { // $FlowFixMe @@ -99,11 +82,7 @@ class FileSelector extends React.PureComponent { autoFocus={autoFocus} button="primary" disabled={disabled} - onClick={ - type === 'openDirectory' || type === 'openFile' - ? this.handleDirectoryInputSelection - : this.fileInputButton - } + onClick={type === 'openDirectory' ? this.handleDirectoryInputSelection : this.fileInputButton} label={__('Browse')} /> } diff --git a/ui/component/common/form-components/form-field.jsx b/ui/component/common/form-components/form-field.jsx index ebcf4e718..570703cb5 100644 --- a/ui/component/common/form-components/form-field.jsx +++ b/ui/component/common/form-components/form-field.jsx @@ -261,7 +261,7 @@ export class FormField extends React.PureComponent { {!noEmojis && openEmoteMenu && (