From 2f8700a6c308a7a50db81cf4446457023d0c96be Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Thu, 16 Oct 2014 00:46:17 +0400 Subject: [PATCH] bugfixes --- app/js/controllers.js | 36 ++++++++++--------- app/js/locales/en-us.json | 3 +- app/partials/desktop/changelog_modal.html | 3 +- app/partials/desktop/username_edit_modal.html | 2 +- app/partials/desktop/welcome.html | 1 - app/partials/mobile/changelog_modal.html | 2 +- app/partials/mobile/username_edit_modal.html | 2 +- app/partials/mobile/welcome.html | 1 - 8 files changed, 25 insertions(+), 25 deletions(-) diff --git a/app/js/controllers.js b/app/js/controllers.js index 734a286a..94ca6b8b 100644 --- a/app/js/controllers.js +++ b/app/js/controllers.js @@ -694,26 +694,28 @@ angular.module('myApp.controllers', ['myApp.i18n']) }); if ($scope.search.query && $scope.search.query.length >= 5) { - MtpApiManager.invokeApi('contacts.search', {q: $scope.search.query, limit: 10}).then(function (result) { - console.log($scope.search.query, result); - AppUsersManager.saveApiUsers(result.users); + $timeout(function() { if (curJump != jump) return; - $scope.foundUsers = []; - angular.forEach(result.results, function(contactFound) { - var userID = contactFound.user_id; - if (peersInDialogs[userID] === undefined) { - $scope.foundUsers.push({ - userID: userID, - user: AppUsersManager.getUser(userID), - peerString: AppUsersManager.getUserString(userID) - }); + MtpApiManager.invokeApi('contacts.search', {q: $scope.search.query, limit: 10}).then(function (result) { + AppUsersManager.saveApiUsers(result.users); + if (curJump != jump) return; + $scope.foundUsers = []; + angular.forEach(result.results, function(contactFound) { + var userID = contactFound.user_id; + if (peersInDialogs[userID] === undefined) { + $scope.foundUsers.push({ + userID: userID, + user: AppUsersManager.getUser(userID), + peerString: AppUsersManager.getUserString(userID) + }); + } + }); + }, function (error) { + if (error.code == 400) { + error.handled = true; } }); - }, function (error) { - if (error.code == 400) { - error.handled = true; - } - }); + }, 500); } } diff --git a/app/js/locales/en-us.json b/app/js/locales/en-us.json index 25d311b8..64c0ca8d 100644 --- a/app/js/locales/en-us.json +++ b/app/js/locales/en-us.json @@ -341,8 +341,7 @@ "phonebook_modal_submit": "Import contacts", "welcome_header_md": "**Telegram** Web", - "welcome_text_1_md": "This is an unofficial web-client for the **Telegram Messenger**.", - "welcome_text_2_md": "It's still an **alpha-version** and may not be 200% reliable", + "welcome_text_1_md": "The official **web client** for Telegram.", "welcome_start_messaging": "Start Messaging", "welcome_fast_messaging_header": "Fast messaging", "welcome_fast_messaging_text": "Send messages with rich emoji support right from your desktop or laptop computer", diff --git a/app/partials/desktop/changelog_modal.html b/app/partials/desktop/changelog_modal.html index 26a87c3f..dec2b2a4 100644 --- a/app/partials/desktop/changelog_modal.html +++ b/app/partials/desktop/changelog_modal.html @@ -26,7 +26,8 @@ diff --git a/app/partials/desktop/username_edit_modal.html b/app/partials/desktop/username_edit_modal.html index 1e877755..fca296a4 100644 --- a/app/partials/desktop/username_edit_modal.html +++ b/app/partials/desktop/username_edit_modal.html @@ -8,7 +8,7 @@

-
+
diff --git a/app/partials/desktop/welcome.html b/app/partials/desktop/welcome.html index 3b4cd6f9..2ebbe2c9 100644 --- a/app/partials/desktop/welcome.html +++ b/app/partials/desktop/welcome.html @@ -9,7 +9,6 @@

-

diff --git a/app/partials/mobile/changelog_modal.html b/app/partials/mobile/changelog_modal.html index 4247d482..565f5f45 100644 --- a/app/partials/mobile/changelog_modal.html +++ b/app/partials/mobile/changelog_modal.html @@ -26,7 +26,7 @@
  • Usernames support: Choose a username right now!
  • Search can now find public users by username.
  • -
  • Added default recent emoticons.
  • +
  • Most popular emoticons shown in 'recent' when empty
  • Bugfixes
diff --git a/app/partials/mobile/username_edit_modal.html b/app/partials/mobile/username_edit_modal.html index 52791e80..a7330396 100644 --- a/app/partials/mobile/username_edit_modal.html +++ b/app/partials/mobile/username_edit_modal.html @@ -30,7 +30,7 @@