diff --git a/app/js/controllers.js b/app/js/controllers.js index e4db4751..65fd936d 100644 --- a/app/js/controllers.js +++ b/app/js/controllers.js @@ -804,6 +804,13 @@ angular.module('myApp.controllers', ['myApp.i18n']) $scope.$on('ui_dialogs_search_clear', $scope.searchClear); + if (!$scope.noMessages) { + $scope.$on('dialogs_search', function (e, data) { + $scope.search.query = data.query || ''; + $scope.toggleSearch(); + }); + } + var searchTimeoutPromise; function getDialogs(force) { var curJump = ++jump; diff --git a/app/js/lib/ng_utils.js b/app/js/lib/ng_utils.js index 3493efd1..c3fb4824 100644 --- a/app/js/lib/ng_utils.js +++ b/app/js/lib/ng_utils.js @@ -1181,7 +1181,7 @@ angular.module('izhukov.utils', []) var markdownRegExp = /(^|\s)(````?)([\s\S]+?)(````?)([\s\.,:?!;]|$)|(^|\s)`([^\n]+?)`([\s\.,:?!;]|$)/; var siteHashtags = { - Telegram: '#/im?q=%23{1}', + Telegram: 'tg://search_hashtag?hashtag={1}', Twitter: 'https://twitter.com/hashtag/{1}', Instagram: 'https://instagram.com/explore/tags/{1}/', 'Google Plus': 'https://plus.google.com/explore/{1}'