From d0e3b4e85da9bd7fc90f825a69fe11d8e61ec46d Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Mon, 24 Mar 2014 21:08:02 +0400 Subject: [PATCH] fixed invalid contacts search --- app/js/controllers.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/js/controllers.js b/app/js/controllers.js index 64201f45..27f71f58 100644 --- a/app/js/controllers.js +++ b/app/js/controllers.js @@ -283,10 +283,7 @@ angular.module('myApp.controllers', []) AppMessagesManager.getDialogs($scope.search.query, maxID).then(function (dialogsResult) { $scope.dialogs = []; - - if (!$scope.search.query) { - $scope.contacts = []; - } + $scope.contacts = []; if (dialogsResult.dialogs.length) { offset += dialogsResult.dialogs.length; @@ -304,6 +301,8 @@ angular.module('myApp.controllers', []) if (!$scope.search.query) { AppMessagesManager.getDialogs('', maxID, 100); + } else { + showMoreDialogs(); } }, function (error) {