Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fix/cannot move file to another workgroup #948

Merged
merged 3 commits into from
Apr 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion data/lib/src/network/linshare_http_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ class LinShareHttpClient {
}

WorkGroupNodeDto _convertToWorkGroupNodeChild(Map<String, dynamic> nodeChildJson) {
if (nodeChildJson['type'] == WorkGroupNodeType.FOLDER.value) {
if (nodeChildJson['type'] == WorkGroupNodeType.FOLDER.value || nodeChildJson['type'] == WorkGroupNodeType.ROOT_FOLDER.value ) {
return WorkGroupNodeFolderDto.fromJson(nodeChildJson);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,19 @@
// the Additional Terms applicable to LinShare software.
//

enum WorkGroupNodeType {
FOLDER,
DOCUMENT,
DOCUMENT_REVISION
}
enum WorkGroupNodeType { ROOT_FOLDER, FOLDER, DOCUMENT, DOCUMENT_REVISION }

extension WorkGroupNodeTypeExtension on WorkGroupNodeType {
String get value {
switch(this) {
switch (this) {
case WorkGroupNodeType.FOLDER:
return 'FOLDER';
case WorkGroupNodeType.DOCUMENT:
return 'DOCUMENT';
case WorkGroupNodeType.DOCUMENT_REVISION:
return 'DOCUMENT_REVISION';
case WorkGroupNodeType.ROOT_FOLDER:
return 'ROOT_FOLDER';
default:
return toString();
}
Expand Down
Loading