Browse Source

nextcloud,neon: Fix toWebDavFiles removing first entry

pull/319/head
jld3103 2 years ago
parent
commit
15dc7366e7
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  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, ocfavorite: true,
), ),
), ),
(final response) => response.toWebDavFiles(client.webdav), (final response) => response.toWebDavFiles(client.webdav).sublist(1),
emitEmptyCache: true, emitEmptyCache: true,
); );
} }

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

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

Loading…
Cancel
Save