Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #3669 +/- ##
==========================================
- Coverage 2.07% 0.00% -2.08%
- Complexity 0 261 +261
==========================================
Files 89 24 -65
Lines 5343 784 -4559
Branches 1491 0 -1491
==========================================
- Hits 111 0 -111
+ Misses 5114 784 -4330
+ Partials 118 0 -118
☔ View full report in Codecov by Sentry. |
3b66493 to
809e787
Compare
st3iny
left a comment
There was a problem hiding this comment.
I tested it and it works no master and stable27. Please address the feedback regarding jshint.
st3iny
left a comment
There was a problem hiding this comment.
Tested and works. I fixed some minor bugs and merged both if statements.
Please squash all commits and we are ready to merge :)
Signed-off-by: greta <[email protected]>
20b4bee to
5493404
Compare
| if (method_exists(Util::class, 'addInitScript')) { | ||
| Util::addInitScript(Application::APP_ID, 'contacts-files-action'); | ||
| } else { | ||
| Util::addScript(Application::APP_ID, 'contacts-files-action'); |
There was a problem hiding this comment.
| Util::addScript(Application::APP_ID, 'contacts-files-action'); | |
| Util::addScript(Application::APP_ID, 'contacts-files-action', 'files'); |
| } | ||
| console.error('Unable to register vcf import action') | ||
| }) | ||
| if (nextcloudVersionIsGreaterThanOr28) { |
There was a problem hiding this comment.
I am not even sure this is needed. Worse case this will register an unused action 🤷
| id: name, | ||
| displayName: () => t('contacts', 'Import'), | ||
| default: DefaultType.DEFAULT, | ||
| mime, |
| default: DefaultType.DEFAULT, | ||
| mime, | ||
| enabled: (nodes) => { | ||
| return nodes.every((node) => node.mime === mime && (node.permissions & Permission.READ)) |
There was a problem hiding this comment.
Using some with the opposite check is faster as it fill stop at the first false return
Something like
| return nodes.every((node) => node.mime === mime && (node.permissions & Permission.READ)) | |
| return nodes.some((node) => node.mime !== mime || (node.permissions & Permission.READ) === 0) |
fixes #3621