From 4fec64088e087bb214b148dc7f3098eb756b0f20 Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Sat, 14 Jun 2014 00:43:31 +0400 Subject: [PATCH] Search bugfixes --- app/js/controllers.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/js/controllers.js b/app/js/controllers.js index 309138c0..8b370af8 100644 --- a/app/js/controllers.js +++ b/app/js/controllers.js @@ -355,6 +355,9 @@ angular.module('myApp.controllers', []) var prevMessages = false; $scope.$watchCollection('search', function () { + if ($scope.search.messages && (!angular.isString($scope.search.query) || !$scope.search.query.length)) { + prevMessages = $scope.search.messages = false; + } if ($scope.search.messages != prevMessages) { prevMessages = $scope.search.messages; $scope.dialogs = [];