Browse Source

fixed invalid contacts search

master
Igor Zhukov 11 years ago
parent
commit
d0e3b4e85d
  1. 5
      app/js/controllers.js

5
app/js/controllers.js

@ -283,10 +283,7 @@ angular.module('myApp.controllers', [])
AppMessagesManager.getDialogs($scope.search.query, maxID).then(function (dialogsResult) { AppMessagesManager.getDialogs($scope.search.query, maxID).then(function (dialogsResult) {
$scope.dialogs = []; $scope.dialogs = [];
if (!$scope.search.query) {
$scope.contacts = []; $scope.contacts = [];
}
if (dialogsResult.dialogs.length) { if (dialogsResult.dialogs.length) {
offset += dialogsResult.dialogs.length; offset += dialogsResult.dialogs.length;
@ -304,6 +301,8 @@ angular.module('myApp.controllers', [])
if (!$scope.search.query) { if (!$scope.search.query) {
AppMessagesManager.getDialogs('', maxID, 100); AppMessagesManager.getDialogs('', maxID, 100);
} else {
showMoreDialogs();
} }
}, function (error) { }, function (error) {

Loading…
Cancel
Save