<commit_before>angular.module("proBebe.controllers")
.controller("AppCtrl", function($scope, storage, messageHandler, Profile, ScrollPositions) {

  $scope.$on('$ionicView.enter', init);

  var profile;

  function init(){
    reloadProfile();
  }

  function getChildren(){
    profile = storage.get("profile");
    $scope.children = profile.children;
  }

  function reloadProfile () {
    Profile.reloadChild()
    .then(function(success) {
      if(success) getChildren();
    }).catch(function(error) {
      messageHandler.show("Impossível recarregar o perfil");
    });
  }

  $scope.clearScroll = function(){
    ScrollPositions['maintain_scroll'] = false;
  }
});
<commit_msg>Define emit event to open filter<commit_after>angular.module("proBebe.controllers")
.controller("AppCtrl", function($scope, $rootScope, storage, messageHandler, Profile, ScrollPositions) {

  $scope.$on('$ionicView.enter', init);

  var profile;

  function init(){
    reloadProfile();
  }

  function getChildren(){
    profile = storage.get("profile");
    $scope.children = profile.children;
  }

  function reloadProfile () {
    Profile.reloadChild()
    .then(function(success) {
      if(success) getChildren();
    }).catch(function(error) {
      messageHandler.show("Impossível recarregar o perfil");
    });
  }

  $scope.clearScroll = function(){
    ScrollPositions['maintain_scroll'] = false;
  }

  $scope.openFilter = function(){
    console.log("calll")
    $rootScope.$emit("openFilter");
  }
});

{'fraction_non_alphanumeric': 0.1558960692871419, 'fraction_numerical': 0.0, 'mean_word_length': 4.091525423728814, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3806087', 'n_tokens_mistral': 475, 'n_tokens_neox': 446, 'n_words': 80}