diff --git a/app/js/lib/ng_utils.js b/app/js/lib/ng_utils.js index 34e72745..87d1e708 100644 --- a/app/js/lib/ng_utils.js +++ b/app/js/lib/ng_utils.js @@ -311,9 +311,17 @@ angular.module('izhukov.utils', []) var dbVersion = 1; var openDbPromise; var storageIsAvailable = $window.indexedDB !== undefined && - $window.IDBTransaction !== undefined && - navigator.userAgent.indexOf('Safari') == -1; - // As of Safari 8.0 IndexedDB is REALLY slow, no point in it + $window.IDBTransaction !== undefined; + + // IndexedDB was REALLY slow till Safari 8.0.3, no point in it + if (storageIsAvailable && + navigator.userAgent.indexOf('Safari') != -1 && + navigator.userAgent.indexOf('Chrome') == -1 && + navigator.userAgent.match(/Version\/([67]|8.0.[012])/) + ) { + storageIsAvailable = false; + } + var storeBlobsAvailable = storageIsAvailable || false; function isAvailable () { diff --git a/app/js/services.js b/app/js/services.js index 062e0f80..e199447a 100644 --- a/app/js/services.js +++ b/app/js/services.js @@ -2057,6 +2057,9 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) notification.title = (fromUser.first_name || '') + (fromUser.first_name && fromUser.last_name ? ' ' : '') + (fromUser.last_name || ''); + if (!notification.title) { + notification.title = fromUser.phone || _('conversation_unknown_user_raw'); + } notificationPhoto = fromPhoto; @@ -2814,6 +2817,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) break; } }); + apiDoc.file_name = apiDoc.file_name || ''; }; function getDoc (docID) {