Plugin support for mobile - file lists, which url to use?

Re: Plugin support for mobile - file lists, which url to use?

by sam marshall -
Number of replies: 0
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Dani responded to me in chat, so I'm pasting here for the record in case anyone else was wondering:

it's a known issue. Angular first renders the HTML, and that triggers a request to the file. Then Angular executes the directives (so we treat the URL and convert it into a tokenpluginfile URL) and renders it again, causing the second request. We have an issue open to look at it, but I guess it won't be easy to fix:

https://tracker.moodle.org/browse/MOBILE-3403

If you use a tokenpluginfile URL I think the app shouldn't change it, so Angular should skip the second request because the URL hasn't changed. But Moodle core never does that, so I guess it's not worth the effort to do that in a plugin