diff --git a/app/css/app.css b/app/css/app.css index 605dc11f..66db3838 100644 --- a/app/css/app.css +++ b/app/css/app.css @@ -3563,6 +3563,14 @@ ce671b orange background-size: 160px 160px; margin: 0 auto; } +.changelog_card_search { + width: 133px; + height: 133px; + display: block; + background: url(../img/changelog/search.png) no-repeat 0 0; + background-size: 133px 133px; + margin: 0 auto; +} .changelog_version_title { color: #9d9479; diff --git a/app/img/changelog/search.png b/app/img/changelog/search.png new file mode 100644 index 00000000..e79c00b1 Binary files /dev/null and b/app/img/changelog/search.png differ diff --git a/app/js/app.js b/app/js/app.js index df983cab..2cbb4093 100644 --- a/app/js/app.js +++ b/app/js/app.js @@ -1,5 +1,5 @@ /*! - * Webogram v0.1.5 - messaging web application for MTProto + * Webogram v0.1.6 - messaging web application for MTProto * https://github.com/zhukov/webogram * Copyright (C) 2014 Igor Zhukov * https://github.com/zhukov/webogram/blob/master/LICENSE diff --git a/app/js/background.js b/app/js/background.js index 3b50295a..f8aee777 100644 --- a/app/js/background.js +++ b/app/js/background.js @@ -1,5 +1,5 @@ /*! - * Webogram v0.1.5 - messaging web application for MTProto + * Webogram v0.1.6 - messaging web application for MTProto * https://github.com/zhukov/webogram * Copyright (C) 2014 Igor Zhukov * https://github.com/zhukov/webogram/blob/master/LICENSE diff --git a/app/js/controllers.js b/app/js/controllers.js index 0cce23e5..309138c0 100644 --- a/app/js/controllers.js +++ b/app/js/controllers.js @@ -1,5 +1,5 @@ /*! - * Webogram v0.1.5 - messaging web application for MTProto + * Webogram v0.1.6 - messaging web application for MTProto * https://github.com/zhukov/webogram * Copyright (C) 2014 Igor Zhukov * https://github.com/zhukov/webogram/blob/master/LICENSE @@ -11,7 +11,7 @@ angular.module('myApp.controllers', []) - .controller('AppWelcomeController', function($scope, $location, MtpApiManager, ErrorService) { + .controller('AppWelcomeController', function($scope, $location, MtpApiManager, ErrorService, ChangelogNotifyService) { MtpApiManager.getUserID().then(function (id) { if (id) { $location.url('/im'); @@ -19,9 +19,11 @@ angular.module('myApp.controllers', []) $scope.showWelcome = true; } }); + + ChangelogNotifyService.checkUpdate(); }) - .controller('AppLoginController', function ($scope, $location, $timeout, $modal, $modalStack, MtpApiManager, ErrorService) { + .controller('AppLoginController', function ($scope, $location, $timeout, $modal, $modalStack, MtpApiManager, ErrorService, ChangelogNotifyService) { $modalStack.dismissAll(); @@ -208,6 +210,8 @@ angular.module('myApp.controllers', []) }); }; + + ChangelogNotifyService.checkUpdate(); }) .controller('AppIMController', function ($scope, $location, $routeParams, $modal, $rootScope, $modalStack, MtpApiManager, AppUsersManager, ContactsSelectService, ChangelogNotifyService, ErrorService) { @@ -349,7 +353,16 @@ angular.module('myApp.controllers', []) } }); - $scope.$watchCollection('search', loadDialogs); + var prevMessages = false; + $scope.$watchCollection('search', function () { + if ($scope.search.messages != prevMessages) { + prevMessages = $scope.search.messages; + $scope.dialogs = []; + loadDialogs(true); + } else { + loadDialogs(); + } + }); $scope.importContact = function () { AppUsersManager.openImportContact().then(function (foundContact) { @@ -368,14 +381,14 @@ angular.module('myApp.controllers', []) }; var searchTimeoutPromise; - function getDialogs() { + function getDialogs(force) { var searchMessages = $scope.search.messages && $scope.search.query.length > 0, curJump = ++jump, promise; $timeout.cancel(searchTimeoutPromise); if (searchMessages) { - searchTimeoutPromise = $timeout(angular.noop, 500); + searchTimeoutPromise = force ? $q.when() : $timeout(angular.noop, 500); promise = searchTimeoutPromise.then(function () { return AppMessagesManager.getSearch({_: 'inputPeerEmpty'}, $scope.search.query, {_: 'inputMessagesFilterEmpty'}, maxID) }); @@ -444,14 +457,14 @@ angular.module('myApp.controllers', []) }) }; - function loadDialogs () { + function loadDialogs (force) { offset = 0; maxID = 0; hasMore = false; peersInDialogs = {}; contactsShown = false; - getDialogs().then(function (dialogsResult) { + getDialogs(force).then(function (dialogsResult) { $scope.dialogs = []; $scope.contacts = []; diff --git a/app/js/directives.js b/app/js/directives.js index 73459dde..9dfd3815 100644 --- a/app/js/directives.js +++ b/app/js/directives.js @@ -1,5 +1,5 @@ /*! - * Webogram v0.1.5 - messaging web application for MTProto + * Webogram v0.1.6 - messaging web application for MTProto * https://github.com/zhukov/webogram * Copyright (C) 2014 Igor Zhukov * https://github.com/zhukov/webogram/blob/master/LICENSE diff --git a/app/js/filters.js b/app/js/filters.js index 1d9acd7e..b8031718 100644 --- a/app/js/filters.js +++ b/app/js/filters.js @@ -1,5 +1,5 @@ /*! - * Webogram v0.1.5 - messaging web application for MTProto + * Webogram v0.1.6 - messaging web application for MTProto * https://github.com/zhukov/webogram * Copyright (C) 2014 Igor Zhukov * https://github.com/zhukov/webogram/blob/master/LICENSE diff --git a/app/js/lib/aes_worker.js b/app/js/lib/aes_worker.js index 5702b396..4fb69b50 100644 --- a/app/js/lib/aes_worker.js +++ b/app/js/lib/aes_worker.js @@ -1,5 +1,5 @@ /*! - * Webogram v0.1.5 - messaging web application for MTProto + * Webogram v0.1.6 - messaging web application for MTProto * https://github.com/zhukov/webogram * Copyright (C) 2014 Igor Zhukov * https://github.com/zhukov/webogram/blob/master/LICENSE diff --git a/app/js/lib/config.js b/app/js/lib/config.js index 2099fa50..c7ec00d5 100644 --- a/app/js/lib/config.js +++ b/app/js/lib/config.js @@ -1,5 +1,5 @@ /*! - * Webogram v0.1.5 - messaging web application for MTProto + * Webogram v0.1.6 - messaging web application for MTProto * https://github.com/zhukov/webogram * Copyright (C) 2014 Igor Zhukov * https://github.com/zhukov/webogram/blob/master/LICENSE @@ -21,7 +21,7 @@ Config = window.Config || {}; Config.App = { id: 2496, hash: '8da85b0d5bfe62527e5b244c209159c3', - version: '0.1.5' + version: '0.1.6' }; Config.Modes = { diff --git a/app/js/lib/mtproto.js b/app/js/lib/mtproto.js index cc1516d9..245a1da9 100644 --- a/app/js/lib/mtproto.js +++ b/app/js/lib/mtproto.js @@ -1,5 +1,5 @@ /*! - * Webogram v0.1.5 - messaging web application for MTProto + * Webogram v0.1.6 - messaging web application for MTProto * https://github.com/zhukov/webogram * Copyright (C) 2014 Igor Zhukov * https://github.com/zhukov/webogram/blob/master/LICENSE diff --git a/app/js/lib/pq_worker.js b/app/js/lib/pq_worker.js index 367a6a83..2e7adab2 100644 --- a/app/js/lib/pq_worker.js +++ b/app/js/lib/pq_worker.js @@ -1,5 +1,5 @@ /*! - * Webogram v0.1.5 - messaging web application for MTProto + * Webogram v0.1.6 - messaging web application for MTProto * https://github.com/zhukov/webogram * Copyright (C) 2014 Igor Zhukov * https://github.com/zhukov/webogram/blob/master/LICENSE diff --git a/app/js/lib/sha1_worker.js b/app/js/lib/sha1_worker.js index 7183a667..f99aa3ba 100644 --- a/app/js/lib/sha1_worker.js +++ b/app/js/lib/sha1_worker.js @@ -1,5 +1,5 @@ /*! - * Webogram v0.1.5 - messaging web application for MTProto + * Webogram v0.1.6 - messaging web application for MTProto * https://github.com/zhukov/webogram * Copyright (C) 2014 Igor Zhukov * https://github.com/zhukov/webogram/blob/master/LICENSE diff --git a/app/js/services.js b/app/js/services.js index abc0fbee..b6f1856a 100644 --- a/app/js/services.js +++ b/app/js/services.js @@ -1,5 +1,5 @@ /*! - * Webogram v0.1.5 - messaging web application for MTProto + * Webogram v0.1.6 - messaging web application for MTProto * https://github.com/zhukov/webogram * Copyright (C) 2014 Igor Zhukov * https://github.com/zhukov/webogram/blob/master/LICENSE @@ -3694,7 +3694,9 @@ angular.module('myApp.services', []) function checkUpdate () { AppConfigManager.get('last_version').then(function (lastVersion) { if (lastVersion != Config.App.version) { - showChangelog(lastVersion || '0'); + if (lastVersion) { + showChangelog(lastVersion); + } AppConfigManager.set({last_version: Config.App.version}); } }) diff --git a/app/js/util.js b/app/js/util.js index 87836435..6378ab46 100644 --- a/app/js/util.js +++ b/app/js/util.js @@ -1,5 +1,5 @@ /*! - * Webogram v0.1.5 - messaging web application for MTProto + * Webogram v0.1.6 - messaging web application for MTProto * https://github.com/zhukov/webogram * Copyright (C) 2014 Igor Zhukov * https://github.com/zhukov/webogram/blob/master/LICENSE diff --git a/app/manifest.json b/app/manifest.json index b53cfa1b..13cdb975 100644 --- a/app/manifest.json +++ b/app/manifest.json @@ -1,6 +1,6 @@ { "name": "Telegram UNOFFICIAL", - "version": "0.1.5", + "version": "0.1.6", "short_name": "Webogram", "manifest_version": 2, "app": { diff --git a/app/manifest.webapp b/app/manifest.webapp index 8caf8ab0..c53489bd 100644 --- a/app/manifest.webapp +++ b/app/manifest.webapp @@ -1,7 +1,7 @@ { "name": "Webogram", "description": "Webogram – UNOFFICIAL Telegram Web App.\nMore info & source code here: https://github.com/zhukov/webogram", - "version": "0.1.5", + "version": "0.1.6", "type": "privileged", "launch_path": "/index.html", "developer": { diff --git a/app/partials/changelog_modal.html b/app/partials/changelog_modal.html index bb632a13..ec11980b 100644 --- a/app/partials/changelog_modal.html +++ b/app/partials/changelog_modal.html @@ -6,11 +6,11 @@
-
+

Recent updates in Telegram Web

-
+

Telegram Web has been updated!

@@ -20,12 +20,25 @@ + + diff --git a/app/partials/confirm_modal.html b/app/partials/confirm_modal.html index 9adc3d9f..f11e846c 100644 --- a/app/partials/confirm_modal.html +++ b/app/partials/confirm_modal.html @@ -21,7 +21,7 @@ Are you sure to send file(s) from clipboard? Are you sure you want to delete the message? - We will now send selected contacts to Telegram servers in order to find your friends in Telegram. + Telegram will now sync your contacts in order to find your friends.
Is this phone number correct?
diff --git a/package.json b/package.json index debaa03c..f3192c58 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webogram", - "version": "0.1.5", + "version": "0.1.6", "description": "Telegram UNOFFICIAL Web App", "main": "app/index.html", "single-instance": true,