Skip to content

Commit

Permalink
#21
Browse files Browse the repository at this point in the history
  • Loading branch information
Jayson Ward committed Jan 5, 2017
1 parent 78b8f4e commit 4daa38d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions HistoryManager/HistoryManager.qml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ FileFolder {

// METHODS /////////////////////////////////////////////////////////////////

function readHistory(id){

function getHistory(){
if(historyManager.makePath(historyManager.path)){
if(!historyManager.fileExists(historyFile)){
historyManager.writeTextFile(historyFile,"");
Expand All @@ -55,6 +54,12 @@ FileFolder {
else{
currentHistory = JSON.parse(h);
}
}

function readHistory(id){
if(currentHistory === null){
getHistory();
}

if( id !== undefined && id !== null && id !== ""){
if(currentHistory.hasOwnProperty(id) && currentHistory[id].length > 0){
Expand Down

1 comment on commit 4daa38d

@defiantgoat
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This actually is related to #25 and not #21

Please sign in to comment.