|
|
@ -338,7 +338,9 @@ angular.module('myApp.controllers', ['myApp.i18n']) |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
$scope.$on('esc_no_more', function () { |
|
|
|
$scope.$on('esc_no_more', function () { |
|
|
|
|
|
|
|
$rootScope.$apply(function () { |
|
|
|
$location.url('/im'); |
|
|
|
$location.url('/im'); |
|
|
|
|
|
|
|
}) |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -393,11 +395,20 @@ angular.module('myApp.controllers', ['myApp.i18n']) |
|
|
|
}); |
|
|
|
}); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.searchClear = function () { |
|
|
|
|
|
|
|
$scope.search.query = ''; |
|
|
|
|
|
|
|
$scope.search.messages = false; |
|
|
|
|
|
|
|
$scope.$broadcast('search_clear'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$scope.dialogSelect = function (peerString, messageID) { |
|
|
|
$scope.dialogSelect = function (peerString, messageID) { |
|
|
|
var params = {peerString: peerString}; |
|
|
|
var params = {peerString: peerString}; |
|
|
|
if (messageID) { |
|
|
|
if (messageID) { |
|
|
|
params.messageID = messageID; |
|
|
|
params.messageID = messageID; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
else if ($scope.search.query) { |
|
|
|
|
|
|
|
$scope.searchClear(); |
|
|
|
|
|
|
|
} |
|
|
|
$rootScope.$broadcast('history_focus', params); |
|
|
|
$rootScope.$broadcast('history_focus', params); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
@ -601,11 +612,6 @@ angular.module('myApp.controllers', ['myApp.i18n']) |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
$scope.searchClear = function () { |
|
|
|
|
|
|
|
$scope.search.query = ''; |
|
|
|
|
|
|
|
$scope.search.messages = false; |
|
|
|
|
|
|
|
$scope.$broadcast('search_clear'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
$scope.$on('ui_dialogs_search_clear', $scope.searchClear); |
|
|
|
$scope.$on('ui_dialogs_search_clear', $scope.searchClear); |
|
|
|
|
|
|
|
|
|
|
|
var searchTimeoutPromise; |
|
|
|
var searchTimeoutPromise; |
|
|
@ -1150,6 +1156,7 @@ angular.module('myApp.controllers', ['myApp.i18n']) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function showEmptyHistory () { |
|
|
|
function showEmptyHistory () { |
|
|
|
|
|
|
|
jump++; |
|
|
|
safeReplaceObject($scope.historyPeer, {}); |
|
|
|
safeReplaceObject($scope.historyPeer, {}); |
|
|
|
safeReplaceObject($scope.state, {notSelected: true}); |
|
|
|
safeReplaceObject($scope.state, {notSelected: true}); |
|
|
|
peerHistory = false; |
|
|
|
peerHistory = false; |
|
|
|