mirror of
https://github.com/ThisIsBenny/iOS-Widgets.git
synced 2025-05-01 20:27:41 +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
|
||||
- show amount for prepaid cards
|
||||
- show remaining days as progress-bar
|
||||
- Setup assistent
|
||||
v1.2.4:
|
||||
- use color.dynamic
|
||||
v1.2.3:
|
||||
|
@ -82,7 +83,7 @@ config.widgetFamily = config.widgetFamily || 'small'
|
|||
let widgetInputRAW = args.widgetParameter;
|
||||
|
||||
let widgetInput = null;
|
||||
let user, pass, number, json
|
||||
let user, pass, number, json, cacheUUID
|
||||
if (widgetInputRAW !== null) {
|
||||
const parameter = widgetInputRAW.toString().split("|")
|
||||
if(parameter.length > 1) {
|
||||
|
@ -100,7 +101,7 @@ if (widgetInputRAW !== null) {
|
|||
if (json) {
|
||||
try {
|
||||
const c = JSON.parse(json)
|
||||
|
||||
cacheUUID = c.uuid || null
|
||||
containerList = c.containerList || containerList
|
||||
codeList = c.codeList || codeList
|
||||
darkModeSupport = c.darkModeSupport !== undefined ? c.darkModeSupport : darkModeSupport
|
||||
|
@ -288,6 +289,7 @@ async function setupAssistant () {
|
|||
const codeList = [...new Set(selectedList.map(x => x.code))]
|
||||
|
||||
const options = {
|
||||
uuid: UUID.string(),
|
||||
containerList,
|
||||
codeList
|
||||
}
|
||||
|
@ -576,7 +578,7 @@ var today = new Date()
|
|||
const files = FileManager.local()
|
||||
|
||||
// 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 cacheExists = files.fileExists(cachePath)
|
||||
const cacheDate = cacheExists ? files.modificationDate(cachePath) : 0
|
||||
|
|
Loading…
Add table
Reference in a new issue