mirror of https://github.com/micromata/borgbackup-butler.git

Fin Reinhard
25.24.2019 b633a22540f255b3c70e739f2dee07dacfb43a79
fixing force step into when going back
1 files modified
21 ■■■■ changed files
borgbutler-webapp/src/components/views/archives/FileListPanel.jsx 21 ●●●● patch | view | raw | blame | history
borgbutler-webapp/src/components/views/archives/FileListPanel.jsx
@@ -1,5 +1,5 @@
import React from 'react'
import cookie from "react-cookies";
import cookie from 'react-cookies';
import {withRouter} from 'react-router-dom';
import {Breadcrumb, Button} from 'reactstrap';
import {getRestServiceUrl} from '../../../utilities/global';
@@ -30,7 +30,8 @@
                diffArchiveId: '',
                autoChangeDirectoryToLeafItem: true,
                openDownloads: true
            }
            },
            forceStepIntoDir: false
        };
        // Resetting the NoReFetch State
        if (props.location.state) {
@@ -56,8 +57,20 @@
        this.unregisterHistoryListener();
    }
    handleURLChange = location => {
        if (location.state && location.state.noReFetch) {
    handleURLChange = (location, action) => {
        // When Action is going back and the last step was a force step go one extra
        if (action === 'POP' && this.state.forceStepIntoDir) {
            this.props.history.go(-1);
            this.setState({forceStepIntoDir: false});
            return;
        }
        const noReFetch = location.state && location.state.noReFetch;
        this.setState({forceStepIntoDir: noReFetch});
        if (noReFetch) {
            return;
        }