aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/services/content
diff options
context:
space:
mode:
authorLibravatar vantezzen <hello@vantezzen.io>2019-10-06 15:09:32 +0200
committerLibravatar vantezzen <hello@vantezzen.io>2019-10-06 15:09:32 +0200
commit26c075372a1bb461752c873cfed0a96b10a4bba9 (patch)
tree3eaf471910990e81b2d718e42c3e9e31bbdc6cd0 /src/components/services/content
parentMerge pull request #102 from getferdi/l10n_master (diff)
downloadferdium-app-26c075372a1bb461752c873cfed0a96b10a4bba9.tar.gz
ferdium-app-26c075372a1bb461752c873cfed0a96b10a4bba9.tar.zst
ferdium-app-26c075372a1bb461752c873cfed0a96b10a4bba9.zip
Add option to choose hibernation strategy
Diffstat (limited to 'src/components/services/content')
-rw-r--r--src/components/services/content/ServiceView.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/components/services/content/ServiceView.js b/src/components/services/content/ServiceView.js
index 0cfefc92b..f6686548d 100644
--- a/src/components/services/content/ServiceView.js
+++ b/src/components/services/content/ServiceView.js
@@ -3,7 +3,6 @@ import PropTypes from 'prop-types';
3import { autorun, reaction } from 'mobx'; 3import { autorun, reaction } from 'mobx';
4import { observer, inject } from 'mobx-react'; 4import { observer, inject } from 'mobx-react';
5import classnames from 'classnames'; 5import classnames from 'classnames';
6import ms from 'ms';
7 6
8import ServiceModel from '../../../models/Service'; 7import ServiceModel from '../../../models/Service';
9import StatusBarTargetUrl from '../../ui/StatusBarTargetUrl'; 8import StatusBarTargetUrl from '../../ui/StatusBarTargetUrl';
@@ -104,11 +103,13 @@ export default @observer @inject('stores') class ServiceView extends Component {
104 }; 103 };
105 104
106 startHibernationTimer() { 105 startHibernationTimer() {
106 const timerDuration = (Number(this.props.stores.settings.all.app.hibernationStrategy) || 300) * 1000;
107
107 const hibernationTimer = setTimeout(() => { 108 const hibernationTimer = setTimeout(() => {
108 this.setState({ 109 this.setState({
109 hibernate: true, 110 hibernate: true,
110 }); 111 });
111 }, ms('5m')); 112 }, timerDuration);
112 113
113 this.setState({ 114 this.setState({
114 hibernationTimer, 115 hibernationTimer,