Commit 9f3aa0cf authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Fixes for History management.

- Syncing store with localstorage when deleting items.
- Initial load is now done inside Docs.History.init.
parent 6e4ce0bc
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -27,6 +27,5 @@ Ext.application({
    launch: function() {
        Docs.App = this;
        Docs.History.init();
        this.getStore('History').load(); // Load History from localStorage
    }
});
+3 −0
Original line number Diff line number Diff line
@@ -15,7 +15,9 @@ Ext.define("Docs.History", {
            this.navigate(Ext.util.History.getToken());
        }, this);
        Ext.util.History.on("change", this.navigate, this);
        // Load History from localStorage
        this.store = Ext.getStore("History");
        this.store.load();
    },

    // Parses current URL and navigates to the page
@@ -93,5 +95,6 @@ Ext.define("Docs.History", {
    removeClass: function(cls) {
        var index = this.store.find('cls', cls);
        this.store.removeAt(index);
        this.store.sync();
    }
});