<commit_before>'use strict';

function TasksController($location, $scope, DateService, SwiperService, UISessionService, TasksService, AnalyticsService) {
  var featureChangedCallback = function featureChangedCallback(newFeature, oldFeature){
    if (newFeature.name === 'taskEdit'){
      if (newFeature.data){
        $scope.task = newFeature.data;
      }else{
        $scope.task = {
          relationships: {}
        };
      }
      if ($scope.task.due) $scope.showDateInput = true;
    }
  }
  UISessionService.registerFeatureChangedCallback(featureChangedCallback, 'TasksController');

  $scope.focusDate = function() {
    $scope.showDateInput = true;
  };

  $scope.hideDate = function() {
    $scope.showDateInput = false;
  };

  $scope.repeatTypes = ['daily', 'weekly', 'monthly', 'yearly'];<commit_msg>Fixed date activation sticking between edits<commit_after>'use strict';

function TasksController($location, $scope, DateService, SwiperService, UISessionService, TasksService, AnalyticsService) {
  var featureChangedCallback = function featureChangedCallback(newFeature, oldFeature){
    if (newFeature.name === 'taskEdit'){
      if (newFeature.data){
        $scope.task = newFeature.data;
      }else{
        $scope.task = {
          relationships: {}
        };
      }
      if ($scope.task.due) $scope.showDateInput = true;
      else $scope.showDateInput = false;
    }
  }
  UISessionService.registerFeatureChangedCallback(featureChangedCallback, 'TasksController');

  $scope.focusDate = function() {
    $scope.showDateInput = true;
  };

  $scope.hideDate = function() {
    $scope.showDateInput = false;
  };

  $scope.repeatTypes = ['daily', 'weekly', 'monthly', 'yearly'];
{'fraction_non_alphanumeric': 0.1324736225087925, 'fraction_numerical': 0.0, 'mean_word_length': 3.7285318559556786, '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': '5936027', 'n_tokens_mistral': 505, 'n_tokens_neox': 496, 'n_words': 95}