Skip to content

Commit

Permalink
Merge pull request #36 from petrvecera/playerScore
Browse files Browse the repository at this point in the history
Load the VM store after correct filter is applied
  • Loading branch information
Petr Vecera authored Aug 21, 2017
2 parents dc4ae1d + 07c9ae6 commit 93f4804
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
7 changes: 2 additions & 5 deletions App/app/view/charts/PlayerVsPlayerViewController.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,8 @@ Ext.define('Enif.view.charts.PlayerVsPlayerViewController', {
const playerData = Ext.getStore('SortedPlayerData').getData();
if (!playerData) return;

const gameStore = Ext.getStore('GameRawData');
gameStore.clearFilter();


let thisStoreData = [];


const VM = this.getViewModel(),
playerId = VM.get('firstPlayerId'),
playerId2 = VM.get('secondPlayerId'),
Expand All @@ -138,6 +133,8 @@ Ext.define('Enif.view.charts.PlayerVsPlayerViewController', {
//init filtering of the grid store
this.filterMatchesStore();

const gameStore = VM.getStore('playedGames');

let score = 0,
wins = 0,
loses = 0,
Expand Down
7 changes: 2 additions & 5 deletions App/metadata/view/charts.PlayerVsPlayerViewModel
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,8 @@
"const playerData = Ext.getStore('SortedPlayerData').getData();",
"if (!playerData) return;",
"",
"const gameStore = Ext.getStore('GameRawData');",
"gameStore.clearFilter();",
"",
"",
"let thisStoreData = [];",
"",
"",
"const VM = this.getViewModel(),",
" playerId = VM.get('firstPlayerId'),",
" playerId2 = VM.get('secondPlayerId'),",
Expand All @@ -105,6 +100,8 @@
"//init filtering of the grid store",
"this.filterMatchesStore();",
"",
"const gameStore = VM.getStore('playedGames');",
"",
"let score = 0,",
" wins = 0,",
" loses = 0,",
Expand Down

0 comments on commit 93f4804

Please sign in to comment.