Browse Source

Merge pull request #319 from provokateurin/fix/webdav-files-sublist

nextcloud,neon: Fix toWebDavFiles removing first entry
pull/318/head
Kate 2 years ago committed by GitHub
parent
commit
a525503d2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      packages/neon/neon_files/lib/blocs/browser.dart
  2. 1
      packages/nextcloud/lib/src/webdav/file.dart

2
packages/neon/neon_files/lib/blocs/browser.dart

@ -55,7 +55,7 @@ class FilesBrowserBloc extends InteractiveBloc implements FilesBrowserBlocEvents
ocfavorite: true,
),
),
(final response) => response.toWebDavFiles(client.webdav),
(final response) => response.toWebDavFiles(client.webdav).sublist(1),
emitEmptyCache: true,
);
}

1
packages/nextcloud/lib/src/webdav/file.dart

@ -4,7 +4,6 @@ part of '../../nextcloud.dart';
extension WebDavMultistatusFile on WebDavMultistatus {
/// Convert the [WebDavMultistatus] into a [WebDavFile] for easier handling
List<WebDavFile> toWebDavFiles(final WebDavClient client) => responses
.sublist(1)
.where((final response) => response.href != null)
.map(
(final response) => WebDavFile(

Loading…
Cancel
Save