Skip to content

Commit

Permalink
Create dummy file in files tab
Browse files Browse the repository at this point in the history
  • Loading branch information
klein0r committed Jan 16, 2024
1 parent 9de10f0 commit ea1adc5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ Sentry reporting, starting with js-controller 3.0, means that this adapter can u
Placeholder for the next version (at the beginning of the line):
### **WORK IN PROGRESS**
-->
### **WORK IN PROGRESS**
* (klein0r) Create dummy file in files tab

### 1.14.0 (2024-01-07)
* (klein0r) Allow to set custom http user agent
* (klein0r) Added option to use files tab for calendar files
Expand Down
8 changes: 8 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1604,6 +1604,14 @@ function main() {
adapter.config.language = adapter.config.language || 'en';
adapter.config.daysPast = parseInt(adapter.config.daysPast) || 0;

const helpFilePath = '/UPLOAD_FILES_HERE.txt';
adapter.fileExistsAsync(adapter.namespace, helpFilePath)
.then(fileExists => {
if (!fileExists) {
adapter.writeFileAsync(adapter.namespace, helpFilePath, 'Place your *.ics files in this directory');
}
});

syncUserEvents(readAll);
}

Expand Down

0 comments on commit ea1adc5

Please sign in to comment.