Enabled IndexedDB for Safari 8.0.3+
This commit is contained in:
parent
51a3fd6984
commit
b9fced4f7e
@ -311,9 +311,17 @@ angular.module('izhukov.utils', [])
|
|||||||
var dbVersion = 1;
|
var dbVersion = 1;
|
||||||
var openDbPromise;
|
var openDbPromise;
|
||||||
var storageIsAvailable = $window.indexedDB !== undefined &&
|
var storageIsAvailable = $window.indexedDB !== undefined &&
|
||||||
$window.IDBTransaction !== undefined &&
|
$window.IDBTransaction !== undefined;
|
||||||
navigator.userAgent.indexOf('Safari') == -1;
|
|
||||||
// As of Safari 8.0 IndexedDB is REALLY slow, no point in it
|
// 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;
|
var storeBlobsAvailable = storageIsAvailable || false;
|
||||||
|
|
||||||
function isAvailable () {
|
function isAvailable () {
|
||||||
|
@ -2057,6 +2057,9 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
|
|||||||
notification.title = (fromUser.first_name || '') +
|
notification.title = (fromUser.first_name || '') +
|
||||||
(fromUser.first_name && fromUser.last_name ? ' ' : '') +
|
(fromUser.first_name && fromUser.last_name ? ' ' : '') +
|
||||||
(fromUser.last_name || '');
|
(fromUser.last_name || '');
|
||||||
|
if (!notification.title) {
|
||||||
|
notification.title = fromUser.phone || _('conversation_unknown_user_raw');
|
||||||
|
}
|
||||||
|
|
||||||
notificationPhoto = fromPhoto;
|
notificationPhoto = fromPhoto;
|
||||||
|
|
||||||
@ -2814,6 +2817,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
apiDoc.file_name = apiDoc.file_name || '';
|
||||||
};
|
};
|
||||||
|
|
||||||
function getDoc (docID) {
|
function getDoc (docID) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user