From 5db9f585e8cec20abdadf431d667422af66cf692 Mon Sep 17 00:00:00 2001 From: Kristóf Marussy Date: Thu, 13 May 2021 11:58:35 +0200 Subject: Lazily compute cache size (#1404) Computing the cache size can take a long time if the cache is large. Previously, cache size computation was triggered by opening the Settings pane, which slowed down changing settings even if the user wasn't interested in the cache size. This patch defers cache size computation until the Advanced tab is open in the Setting page. Additionally, cache size rendering (in MB / GB) is moved from the AppStore into the EditSettingsForm to fix the notCleared functionality. --- .../settings/settings/EditSettingsForm.js | 20 +++- src/containers/settings/EditSettingsScreen.js | 3 +- src/i18n/locales/defaultMessages.json | 124 ++++++++++----------- .../settings/settings/EditSettingsForm.json | 124 ++++++++++----------- src/stores/AppStore.js | 3 +- 5 files changed, 143 insertions(+), 131 deletions(-) (limited to 'src') diff --git a/src/components/settings/settings/EditSettingsForm.js b/src/components/settings/settings/EditSettingsForm.js index f7840c5bb..7a0aead15 100644 --- a/src/components/settings/settings/EditSettingsForm.js +++ b/src/components/settings/settings/EditSettingsForm.js @@ -2,6 +2,7 @@ import { remote } from 'electron'; import React, { Component, Fragment } from 'react'; import PropTypes from 'prop-types'; import { observer } from 'mobx-react'; +import prettyBytes from 'pretty-bytes'; import { defineMessages, intlShape } from 'react-intl'; import Form from '../../../lib/Form'; @@ -165,7 +166,7 @@ export default @observer class EditSettingsForm extends Component { updateIsReadyToInstall: PropTypes.bool.isRequired, isClearingAllCache: PropTypes.bool.isRequired, onClearAllCache: PropTypes.func.isRequired, - cacheSize: PropTypes.string.isRequired, + getCacheSize: PropTypes.func.isRequired, isSpellcheckerIncludedInCurrentPlan: PropTypes.bool.isRequired, isTodosEnabled: PropTypes.bool.isRequired, isTodosActivated: PropTypes.bool.isRequired, @@ -221,7 +222,7 @@ export default @observer class EditSettingsForm extends Component { updateIsReadyToInstall, isClearingAllCache, onClearAllCache, - cacheSize, + getCacheSize, isSpellcheckerIncludedInCurrentPlan, isTodosEnabled, isWorkspaceEnabled, @@ -248,7 +249,20 @@ export default @observer class EditSettingsForm extends Component { lockingFeatureEnabled, scheduledDNDEnabled, } = window.ferdi.stores.settings.all.app; - const notCleared = this.state.clearCacheButtonClicked && isClearingAllCache === false && cacheSize !== 0; + + let cacheSize; + let notCleared; + if (this.state.activeSetttingsTab === 'advanced') { + const cacheSizeBytes = getCacheSize(); + if (typeof cacheSizeBytes === 'number') { + cacheSize = prettyBytes(cacheSizeBytes); + notCleared = this.state.clearCacheButtonClicked && isClearingAllCache === false && cacheSizeBytes !== 0; + } else { + cacheSize = '…'; + notCleared = false; + } + } + return (
diff --git a/src/containers/settings/EditSettingsScreen.js b/src/containers/settings/EditSettingsScreen.js index 94c53fc90..49ef03664 100644 --- a/src/containers/settings/EditSettingsScreen.js +++ b/src/containers/settings/EditSettingsScreen.js @@ -587,7 +587,6 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e } = this.props.stores; const { updateStatus, - cacheSize, updateStatusTypes, isClearingAllCache, lockingFeatureEnabled, @@ -610,7 +609,7 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e noUpdateAvailable={updateStatus === updateStatusTypes.NOT_AVAILABLE} updateIsReadyToInstall={updateStatus === updateStatusTypes.DOWNLOADED} onSubmit={d => this.onSubmit(d)} - cacheSize={cacheSize} + getCacheSize={() => app.cacheSize} isClearingAllCache={isClearingAllCache} onClearAllCache={clearAllCache} isSpellcheckerIncludedInCurrentPlan={spellcheckerConfig.isIncludedInCurrentPlan} diff --git a/src/i18n/locales/defaultMessages.json b/src/i18n/locales/defaultMessages.json index d83aa49a8..22e8b8b4a 100644 --- a/src/i18n/locales/defaultMessages.json +++ b/src/i18n/locales/defaultMessages.json @@ -3241,403 +3241,403 @@ "defaultMessage": "!!!Settings", "end": { "column": 3, - "line": 29 + "line": 30 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.headline", "start": { "column": 12, - "line": 26 + "line": 27 } }, { "defaultMessage": "!!!General", "end": { "column": 3, - "line": 33 + "line": 34 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.headlineGeneral", "start": { "column": 19, - "line": 30 + "line": 31 } }, { "defaultMessage": "!!!Sending telemetry data allows us to find errors in Ferdi - we will not send any personal information like your message data! Changing this option requires you to restart Ferdi.", "end": { "column": 3, - "line": 37 + "line": 38 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.sentryInfo", "start": { "column": 14, - "line": 34 + "line": 35 } }, { "defaultMessage": "!!!By default, Ferdi will keep all your services open and loaded in the background so they are ready when you want to use them. Service Hibernation will unload your services after a specified amount. This is useful to save RAM or keeping services from slowing down your computer.", "end": { "column": 3, - "line": 41 + "line": 42 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.hibernateInfo", "start": { "column": 17, - "line": 38 + "line": 39 } }, { "defaultMessage": "!!!Minutes of inactivity, after which Ferdi should automatically lock. Use 0 to disable", "end": { "column": 3, - "line": 45 + "line": 46 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.inactivityLockInfo", "start": { "column": 22, - "line": 42 + "line": 43 } }, { "defaultMessage": "!!!This server will be used for the \"Franz Todo\" feature. (default: https://app.franztodos.com)", "end": { "column": 3, - "line": 49 + "line": 50 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.todoServerInfo", "start": { "column": 18, - "line": 46 + "line": 47 } }, { "defaultMessage": "!!!Password", "end": { "column": 3, - "line": 53 + "line": 54 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.lockedPassword", "start": { "column": 18, - "line": 50 + "line": 51 } }, { "defaultMessage": "!!!Please make sure to set a password you'll remember.\nIf you loose this password, you will have to reinstall Ferdi.", "end": { "column": 3, - "line": 57 + "line": 58 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.lockedPasswordInfo", "start": { "column": 22, - "line": 54 + "line": 55 } }, { "defaultMessage": "!!!Password Lock allows you to keep your messages protected.\nUsing Password Lock, you will be prompted to enter your password everytime you start Ferdi or lock Ferdi yourself using the lock symbol in the bottom left corner or the shortcut CMD/CTRL+Shift+L.", "end": { "column": 3, - "line": 61 + "line": 62 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.lockInfo", "start": { "column": 12, - "line": 58 + "line": 59 } }, { "defaultMessage": "!!!Times in 24-Hour-Format. End time can be before start time (e.g. start 17:00, end 09:00) to enable Do-not-Disturb overnight.", "end": { "column": 3, - "line": 65 + "line": 66 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.scheduledDNDTimeInfo", "start": { "column": 24, - "line": 62 + "line": 63 } }, { "defaultMessage": "!!!Scheduled Do-not-Disturb allows you to define a period of time in which you do not want to get Notifications from Ferdi.", "end": { "column": 3, - "line": 69 + "line": 70 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.scheduledDNDInfo", "start": { "column": 20, - "line": 66 + "line": 67 } }, { "defaultMessage": "!!!Language", "end": { "column": 3, - "line": 73 + "line": 74 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.headlineLanguage", "start": { "column": 20, - "line": 70 + "line": 71 } }, { "defaultMessage": "!!!Updates", "end": { "column": 3, - "line": 77 + "line": 78 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.headlineUpdates", "start": { "column": 19, - "line": 74 + "line": 75 } }, { "defaultMessage": "!!!Appearance", "end": { "column": 3, - "line": 81 + "line": 82 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.headlineAppearance", "start": { "column": 22, - "line": 78 + "line": 79 } }, { "defaultMessage": "!!!Universal Dark Mode tries to dynamically generate dark mode styles for services that are otherwise not currently supported.", "end": { "column": 3, - "line": 85 + "line": 86 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.universalDarkModeInfo", "start": { "column": 25, - "line": 82 + "line": 83 } }, { "defaultMessage": "!!!Write your accent color in a CSS-compatible format. (Default: {defaultAccentColor})", "end": { "column": 3, - "line": 89 + "line": 90 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.accentColorInfo", "start": { "column": 19, - "line": 86 + "line": 87 } }, { "defaultMessage": "!!!Advanced", "end": { "column": 3, - "line": 93 + "line": 94 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.headlineAdvanced", "start": { "column": 20, - "line": 90 + "line": 91 } }, { "defaultMessage": "!!!Help us to translate Ferdi into your language.", "end": { "column": 3, - "line": 97 + "line": 98 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.translationHelp", "start": { "column": 19, - "line": 94 + "line": 95 } }, { "defaultMessage": "!!!Ferdi uses your Mac's build-in spellchecker to check for typos. If you want to change the languages the spellchecker checks for, you can do so in your Mac's System Preferences.", "end": { "column": 3, - "line": 101 + "line": 102 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.spellCheckerLanguageInfo", "start": { "column": 28, - "line": 98 + "line": 99 } }, { "defaultMessage": "!!!Cache", "end": { "column": 3, - "line": 105 + "line": 106 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.subheadlineCache", "start": { "column": 20, - "line": 102 + "line": 103 } }, { "defaultMessage": "!!!Ferdi cache is currently using {size} of disk space.", "end": { "column": 3, - "line": 109 + "line": 110 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.cacheInfo", "start": { "column": 13, - "line": 106 + "line": 107 } }, { "defaultMessage": "!!!Couldn't clear all cache", "end": { "column": 3, - "line": 113 + "line": 114 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.cacheNotCleared", "start": { "column": 19, - "line": 110 + "line": 111 } }, { "defaultMessage": "!!!Clear cache", "end": { "column": 3, - "line": 117 + "line": 118 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.buttonClearAllCache", "start": { "column": 23, - "line": 114 + "line": 115 } }, { "defaultMessage": "!!!Check for updates", "end": { "column": 3, - "line": 121 + "line": 122 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.buttonSearchForUpdate", "start": { "column": 25, - "line": 118 + "line": 119 } }, { "defaultMessage": "!!!Restart & install update", "end": { "column": 3, - "line": 125 + "line": 126 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.buttonInstallUpdate", "start": { "column": 23, - "line": 122 + "line": 123 } }, { "defaultMessage": "!!!Is searching for update", "end": { "column": 3, - "line": 129 + "line": 130 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.updateStatusSearching", "start": { "column": 25, - "line": 126 + "line": 127 } }, { "defaultMessage": "!!!Update available, downloading...", "end": { "column": 3, - "line": 133 + "line": 134 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.updateStatusAvailable", "start": { "column": 25, - "line": 130 + "line": 131 } }, { "defaultMessage": "!!!You are using the latest version of Ferdi", "end": { "column": 3, - "line": 137 + "line": 138 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.updateStatusUpToDate", "start": { "column": 24, - "line": 134 + "line": 135 } }, { "defaultMessage": "!!!Current version:", "end": { "column": 3, - "line": 141 + "line": 142 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.currentVersion", "start": { "column": 18, - "line": 138 + "line": 139 } }, { "defaultMessage": "!!!Changes require restart", "end": { "column": 3, - "line": 145 + "line": 146 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.restartRequired", "start": { "column": 29, - "line": 142 + "line": 143 } }, { "defaultMessage": "!!!Official translations are English & German. All other languages are community based translations.", "end": { "column": 3, - "line": 149 + "line": 150 }, "file": "src/components/settings/settings/EditSettingsForm.js", "id": "settings.app.languageDisclaimer", "start": { "column": 22, - "line": 146 + "line": 147 } } ], diff --git a/src/i18n/messages/src/components/settings/settings/EditSettingsForm.json b/src/i18n/messages/src/components/settings/settings/EditSettingsForm.json index 4b672afc2..569faa7fe 100644 --- a/src/i18n/messages/src/components/settings/settings/EditSettingsForm.json +++ b/src/i18n/messages/src/components/settings/settings/EditSettingsForm.json @@ -4,11 +4,11 @@ "defaultMessage": "!!!Settings", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 26, + "line": 27, "column": 12 }, "end": { - "line": 29, + "line": 30, "column": 3 } }, @@ -17,11 +17,11 @@ "defaultMessage": "!!!General", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 30, + "line": 31, "column": 19 }, "end": { - "line": 33, + "line": 34, "column": 3 } }, @@ -30,11 +30,11 @@ "defaultMessage": "!!!Sending telemetry data allows us to find errors in Ferdi - we will not send any personal information like your message data! Changing this option requires you to restart Ferdi.", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 34, + "line": 35, "column": 14 }, "end": { - "line": 37, + "line": 38, "column": 3 } }, @@ -43,11 +43,11 @@ "defaultMessage": "!!!By default, Ferdi will keep all your services open and loaded in the background so they are ready when you want to use them. Service Hibernation will unload your services after a specified amount. This is useful to save RAM or keeping services from slowing down your computer.", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 38, + "line": 39, "column": 17 }, "end": { - "line": 41, + "line": 42, "column": 3 } }, @@ -56,11 +56,11 @@ "defaultMessage": "!!!Minutes of inactivity, after which Ferdi should automatically lock. Use 0 to disable", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 42, + "line": 43, "column": 22 }, "end": { - "line": 45, + "line": 46, "column": 3 } }, @@ -69,11 +69,11 @@ "defaultMessage": "!!!This server will be used for the \"Franz Todo\" feature. (default: https://app.franztodos.com)", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 46, + "line": 47, "column": 18 }, "end": { - "line": 49, + "line": 50, "column": 3 } }, @@ -82,11 +82,11 @@ "defaultMessage": "!!!Password", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 50, + "line": 51, "column": 18 }, "end": { - "line": 53, + "line": 54, "column": 3 } }, @@ -95,11 +95,11 @@ "defaultMessage": "!!!Please make sure to set a password you'll remember.\nIf you loose this password, you will have to reinstall Ferdi.", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 54, + "line": 55, "column": 22 }, "end": { - "line": 57, + "line": 58, "column": 3 } }, @@ -108,11 +108,11 @@ "defaultMessage": "!!!Password Lock allows you to keep your messages protected.\nUsing Password Lock, you will be prompted to enter your password everytime you start Ferdi or lock Ferdi yourself using the lock symbol in the bottom left corner or the shortcut CMD/CTRL+Shift+L.", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 58, + "line": 59, "column": 12 }, "end": { - "line": 61, + "line": 62, "column": 3 } }, @@ -121,11 +121,11 @@ "defaultMessage": "!!!Times in 24-Hour-Format. End time can be before start time (e.g. start 17:00, end 09:00) to enable Do-not-Disturb overnight.", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 62, + "line": 63, "column": 24 }, "end": { - "line": 65, + "line": 66, "column": 3 } }, @@ -134,11 +134,11 @@ "defaultMessage": "!!!Scheduled Do-not-Disturb allows you to define a period of time in which you do not want to get Notifications from Ferdi.", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 66, + "line": 67, "column": 20 }, "end": { - "line": 69, + "line": 70, "column": 3 } }, @@ -147,11 +147,11 @@ "defaultMessage": "!!!Language", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 70, + "line": 71, "column": 20 }, "end": { - "line": 73, + "line": 74, "column": 3 } }, @@ -160,11 +160,11 @@ "defaultMessage": "!!!Updates", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 74, + "line": 75, "column": 19 }, "end": { - "line": 77, + "line": 78, "column": 3 } }, @@ -173,11 +173,11 @@ "defaultMessage": "!!!Appearance", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 78, + "line": 79, "column": 22 }, "end": { - "line": 81, + "line": 82, "column": 3 } }, @@ -186,11 +186,11 @@ "defaultMessage": "!!!Universal Dark Mode tries to dynamically generate dark mode styles for services that are otherwise not currently supported.", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 82, + "line": 83, "column": 25 }, "end": { - "line": 85, + "line": 86, "column": 3 } }, @@ -199,11 +199,11 @@ "defaultMessage": "!!!Write your accent color in a CSS-compatible format. (Default: {defaultAccentColor})", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 86, + "line": 87, "column": 19 }, "end": { - "line": 89, + "line": 90, "column": 3 } }, @@ -212,11 +212,11 @@ "defaultMessage": "!!!Advanced", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 90, + "line": 91, "column": 20 }, "end": { - "line": 93, + "line": 94, "column": 3 } }, @@ -225,11 +225,11 @@ "defaultMessage": "!!!Help us to translate Ferdi into your language.", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 94, + "line": 95, "column": 19 }, "end": { - "line": 97, + "line": 98, "column": 3 } }, @@ -238,11 +238,11 @@ "defaultMessage": "!!!Ferdi uses your Mac's build-in spellchecker to check for typos. If you want to change the languages the spellchecker checks for, you can do so in your Mac's System Preferences.", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 98, + "line": 99, "column": 28 }, "end": { - "line": 101, + "line": 102, "column": 3 } }, @@ -251,11 +251,11 @@ "defaultMessage": "!!!Cache", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 102, + "line": 103, "column": 20 }, "end": { - "line": 105, + "line": 106, "column": 3 } }, @@ -264,11 +264,11 @@ "defaultMessage": "!!!Ferdi cache is currently using {size} of disk space.", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 106, + "line": 107, "column": 13 }, "end": { - "line": 109, + "line": 110, "column": 3 } }, @@ -277,11 +277,11 @@ "defaultMessage": "!!!Couldn't clear all cache", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 110, + "line": 111, "column": 19 }, "end": { - "line": 113, + "line": 114, "column": 3 } }, @@ -290,11 +290,11 @@ "defaultMessage": "!!!Clear cache", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 114, + "line": 115, "column": 23 }, "end": { - "line": 117, + "line": 118, "column": 3 } }, @@ -303,11 +303,11 @@ "defaultMessage": "!!!Check for updates", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 118, + "line": 119, "column": 25 }, "end": { - "line": 121, + "line": 122, "column": 3 } }, @@ -316,11 +316,11 @@ "defaultMessage": "!!!Restart & install update", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 122, + "line": 123, "column": 23 }, "end": { - "line": 125, + "line": 126, "column": 3 } }, @@ -329,11 +329,11 @@ "defaultMessage": "!!!Is searching for update", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 126, + "line": 127, "column": 25 }, "end": { - "line": 129, + "line": 130, "column": 3 } }, @@ -342,11 +342,11 @@ "defaultMessage": "!!!Update available, downloading...", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 130, + "line": 131, "column": 25 }, "end": { - "line": 133, + "line": 134, "column": 3 } }, @@ -355,11 +355,11 @@ "defaultMessage": "!!!You are using the latest version of Ferdi", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 134, + "line": 135, "column": 24 }, "end": { - "line": 137, + "line": 138, "column": 3 } }, @@ -368,11 +368,11 @@ "defaultMessage": "!!!Current version:", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 138, + "line": 139, "column": 18 }, "end": { - "line": 141, + "line": 142, "column": 3 } }, @@ -381,11 +381,11 @@ "defaultMessage": "!!!Changes require restart", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 142, + "line": 143, "column": 29 }, "end": { - "line": 145, + "line": 146, "column": 3 } }, @@ -394,11 +394,11 @@ "defaultMessage": "!!!Official translations are English & German. All other languages are community based translations.", "file": "src/components/settings/settings/EditSettingsForm.js", "start": { - "line": 146, + "line": 147, "column": 22 }, "end": { - "line": 149, + "line": 150, "column": 3 } } diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js index 529201df5..c409b6ac7 100644 --- a/src/stores/AppStore.js +++ b/src/stores/AppStore.js @@ -4,7 +4,6 @@ import { } from 'mobx'; import moment from 'moment'; import AutoLaunch from 'auto-launch'; -import prettyBytes from 'pretty-bytes'; import ms from 'ms'; import { URL } from 'url'; import os from 'os'; @@ -257,7 +256,7 @@ export default class AppStore extends Store { } @computed get cacheSize() { - return prettyBytes(this.getAppCacheSizeRequest.execute().result || 0); + return this.getAppCacheSizeRequest.execute().result; } @computed get debugInfo() { -- cgit v1.2.3-70-g09d2