mirror of
https://github.com/ThisIsBenny/iOS-Widgets.git
synced 2025-05-02 12:47:40 +00:00
add UUID to Config and Cache Name
Signed-off-by: Benny Samir Hierl <bennysamir@posteo.de>
This commit is contained in:
parent
5395257a56
commit
57b7da9f88
1 changed files with 5 additions and 3 deletions
|
@ -13,6 +13,7 @@ Changelog:
|
||||||
- use MSISDN for Cache-Name
|
- use MSISDN for Cache-Name
|
||||||
- show amount for prepaid cards
|
- show amount for prepaid cards
|
||||||
- show remaining days as progress-bar
|
- show remaining days as progress-bar
|
||||||
|
- Setup assistent
|
||||||
v1.2.4:
|
v1.2.4:
|
||||||
- use color.dynamic
|
- use color.dynamic
|
||||||
v1.2.3:
|
v1.2.3:
|
||||||
|
@ -82,7 +83,7 @@ config.widgetFamily = config.widgetFamily || 'small'
|
||||||
let widgetInputRAW = args.widgetParameter;
|
let widgetInputRAW = args.widgetParameter;
|
||||||
|
|
||||||
let widgetInput = null;
|
let widgetInput = null;
|
||||||
let user, pass, number, json
|
let user, pass, number, json, cacheUUID
|
||||||
if (widgetInputRAW !== null) {
|
if (widgetInputRAW !== null) {
|
||||||
const parameter = widgetInputRAW.toString().split("|")
|
const parameter = widgetInputRAW.toString().split("|")
|
||||||
if(parameter.length > 1) {
|
if(parameter.length > 1) {
|
||||||
|
@ -100,7 +101,7 @@ if (widgetInputRAW !== null) {
|
||||||
if (json) {
|
if (json) {
|
||||||
try {
|
try {
|
||||||
const c = JSON.parse(json)
|
const c = JSON.parse(json)
|
||||||
|
cacheUUID = c.uuid || null
|
||||||
containerList = c.containerList || containerList
|
containerList = c.containerList || containerList
|
||||||
codeList = c.codeList || codeList
|
codeList = c.codeList || codeList
|
||||||
darkModeSupport = c.darkModeSupport !== undefined ? c.darkModeSupport : darkModeSupport
|
darkModeSupport = c.darkModeSupport !== undefined ? c.darkModeSupport : darkModeSupport
|
||||||
|
@ -288,6 +289,7 @@ async function setupAssistant () {
|
||||||
const codeList = [...new Set(selectedList.map(x => x.code))]
|
const codeList = [...new Set(selectedList.map(x => x.code))]
|
||||||
|
|
||||||
const options = {
|
const options = {
|
||||||
|
uuid: UUID.string(),
|
||||||
containerList,
|
containerList,
|
||||||
codeList
|
codeList
|
||||||
}
|
}
|
||||||
|
@ -576,7 +578,7 @@ var today = new Date()
|
||||||
const files = FileManager.local()
|
const files = FileManager.local()
|
||||||
|
|
||||||
// Set up cache
|
// Set up cache
|
||||||
const cacheNamePostfix = (number) ? number.substr(number.length - 4) : 'networkLogin'
|
const cacheNamePostfix = ((number) ? number.substr(number.length - 4) : 'networkLogin') + ( cacheUUID ? `-${cacheUUID}` : '')
|
||||||
const cachePath = files.joinPath(files.documentsDirectory(), "widget-vodafone-" + cacheNamePostfix)
|
const cachePath = files.joinPath(files.documentsDirectory(), "widget-vodafone-" + cacheNamePostfix)
|
||||||
const cacheExists = files.fileExists(cachePath)
|
const cacheExists = files.fileExists(cachePath)
|
||||||
const cacheDate = cacheExists ? files.modificationDate(cachePath) : 0
|
const cacheDate = cacheExists ? files.modificationDate(cachePath) : 0
|
||||||
|
|
Loading…
Add table
Reference in a new issue