Now we've got everything prettified!

This commit is contained in:
Scott Nonnenberg 2018-05-02 09:51:22 -07:00
parent 754d65ae2e
commit a0ed993b42
30 changed files with 3562 additions and 2873 deletions

View file

@ -1,36 +1,34 @@
'use strict';
;(function() {
/*********************************************
*** Utilities to store data about the user ***
**********************************************/
window.textsecure = window.textsecure || {};
window.textsecure.storage = window.textsecure.storage || {};
(function() {
/*********************************************
*** Utilities to store data about the user ***
**********************************************/
window.textsecure = window.textsecure || {};
window.textsecure.storage = window.textsecure.storage || {};
window.textsecure.storage.user = {
setNumberAndDeviceId: function(number, deviceId, deviceName) {
textsecure.storage.put("number_id", number + "." + deviceId);
if (deviceName) {
textsecure.storage.put("device_name", deviceName);
}
},
window.textsecure.storage.user = {
setNumberAndDeviceId: function(number, deviceId, deviceName) {
textsecure.storage.put('number_id', number + '.' + deviceId);
if (deviceName) {
textsecure.storage.put('device_name', deviceName);
}
},
getNumber: function(key, defaultValue) {
var number_id = textsecure.storage.get("number_id");
if (number_id === undefined)
return undefined;
return textsecure.utils.unencodeNumber(number_id)[0];
},
getNumber: function(key, defaultValue) {
var number_id = textsecure.storage.get('number_id');
if (number_id === undefined) return undefined;
return textsecure.utils.unencodeNumber(number_id)[0];
},
getDeviceId: function(key) {
var number_id = textsecure.storage.get("number_id");
if (number_id === undefined)
return undefined;
return textsecure.utils.unencodeNumber(number_id)[1];
},
getDeviceId: function(key) {
var number_id = textsecure.storage.get('number_id');
if (number_id === undefined) return undefined;
return textsecure.utils.unencodeNumber(number_id)[1];
},
getDeviceName: function(key) {
return textsecure.storage.get("device_name");
}
};
getDeviceName: function(key) {
return textsecure.storage.get('device_name');
},
};
})();