Skip to content

Commit

Permalink
Data improvements
Browse files Browse the repository at this point in the history
Runes and summoner spells are now cleared after each patch
  • Loading branch information
Ryzzzen committed Jul 9, 2018
1 parent 5daa9e3 commit 499c489
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,15 @@ ipcRenderer.once('lcu-connected', (event, d) => {
Mana.summonerspells = data[1];
});

Mana.client.getVersion().then(ver => $('.version').text($('.version').text() + ' - V' + (Mana.gameVersion = ver)));
Mana.client.getVersion().then(ver => {
if (Mana.store.get('gameVersion') !== ver) {
Mana.store.set('runes', {});
Mana.store.set('summonerspells', {});
}

Mana.store.set('gameVersion', ver);
$('.version').text($('.version').text() + ' - V' + (Mana.gameVersion = ver));
});
});

ipcRenderer.on('lcu-logged-in', async () => {
Expand Down

0 comments on commit 499c489

Please sign in to comment.