Skip to content

Conversation

@vmarquar
Copy link

Hi,

i created an new medium sized widget that shows the weekly statistics over multiple sports (mainly run, bike, swim). Feel free to add the changes to your original repository if you like to!

Kind Regards,
Valentin

@dwd0tcom
Copy link
Owner

Wohoo! Thanks for your PR.
Unfortunately I got an error on line 335:39. And if you're using FileManager, be sure to make a check if the file exists and if it's downloaded. It can't be accessed, when it's in the cloud. I guess the write function is downloadFileFromiCloud()

Thanks!

// Set to false if you don't want to see a photo
const photoWidget = true
const MAX_Y_HEIGHT = 75; // for medium widget
const DISPLAY_SINGLE_ACTIVITY_AS_MEDIUM_WIDGET = false // set it to true, if you want to display the latest activity as a medium widget
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added an easy option to opt out of the second medium sized widget

filename = filename ? filename : 'strava-data.json'
let fm = FileManager.iCloud();
let path = fm.joinPath(fm.documentsDirectory(), filename);
try {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added error fix, as you suggested

Copy link
Author

@vmarquar vmarquar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added bugfix to load the file from icloud if it has not been synced yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants