Skip to content

Commit

Permalink
perf(nextcloud): do not use the spread operator for building lists
Browse files Browse the repository at this point in the history
Signed-off-by: Nikolas Rimikis <[email protected]>
  • Loading branch information
Leptopoda committed Nov 2, 2023
1 parent ccf6379 commit 146ee73
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/nextcloud/lib/src/client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,15 @@ class NextcloudClient extends DynamiteClient {
baseHeaders: language != null ? {'Accept-Language': language} : null,
userAgent: userAgentOverride ?? appType.userAgent,
authentications: [
if (appPassword != null) ...[
if (appPassword != null)
DynamiteHttpBearerAuthentication(
token: appPassword,
),
],
if (loginName != null && (password ?? appPassword) != null) ...[
if (loginName != null && (password ?? appPassword) != null)
DynamiteHttpBasicAuthentication(
username: loginName,
password: (password ?? appPassword)!,
),
],
],
);

Expand Down

0 comments on commit 146ee73

Please sign in to comment.