<commit_before>"use strict";
angular.module("hikeio").controller("IndexController", 
	["$scope", "$window", "analytics", "navigation", "preferences", "search",
	function($scope, $window, analytics, navigation, preferences, search) {
	
	$scope.searchQuery = "";
	$scope.isSearching = false;
	$scope.search = function() {
		$scope.isSearching = true;
		if ($scope.searchQuery.trim().length !== 0) {
			$window.document.activeElement.blur();
			if (preferences.searchBy === "location") {
				search.searchByLocation($scope.searchQuery).then(function() {
					$scope.isSearching = false;
				});
			} else {
				search.searchByName($scope.searchQuery).then(function() {
					$scope.isSearching = false;
				});
			}
		}
	};
	$scope.htmlReady();
}]);<commit_msg>Only show spinner if user actually searches.<commit_after>"use strict";
angular.module("hikeio").controller("IndexController", 
	["$scope", "$window", "analytics", "navigation", "preferences", "search",
	function($scope, $window, analytics, navigation, preferences, search) {
	
	$scope.searchQuery = "";
	$scope.isSearching = false;
	$scope.search = function() {
		if ($scope.searchQuery.trim().length !== 0) {
			$scope.isSearching = true;
			$window.document.activeElement.blur();
			if (preferences.searchBy === "location") {
				search.searchByLocation($scope.searchQuery).then(function() {
					$scope.isSearching = false;
				});
			} else {
				search.searchByName($scope.searchQuery).then(function() {
					$scope.isSearching = false;
				});
			}
		}
	};
	$scope.htmlReady();
}]);
{'fraction_non_alphanumeric': 0.1869340232858991, 'fraction_numerical': 0.00129366106080207, 'mean_word_length': 4.544802867383512, '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': '7474629', 'n_tokens_mistral': 556, 'n_tokens_neox': 483, 'n_words': 80}