TF-975 Gone all sub folder of folder when move it
This commit is contained in:
@@ -17,7 +17,27 @@ extension PresentationMailboxExtension on PresentationMailbox {
|
||||
myRights: myRights,
|
||||
isSubscribed: isSubscribed,
|
||||
selectMode: selectMode,
|
||||
mailboxPath: mailboxPath
|
||||
mailboxPath: mailboxPath,
|
||||
state: state
|
||||
);
|
||||
}
|
||||
|
||||
PresentationMailbox withMailboxSate(MailboxState newMailboxState) {
|
||||
return PresentationMailbox(
|
||||
id,
|
||||
name: name,
|
||||
parentId: parentId,
|
||||
role: role,
|
||||
sortOrder: sortOrder,
|
||||
totalEmails: totalEmails,
|
||||
unreadEmails: unreadEmails,
|
||||
totalThreads: totalThreads,
|
||||
unreadThreads: unreadThreads,
|
||||
myRights: myRights,
|
||||
isSubscribed: isSubscribed,
|
||||
selectMode: selectMode,
|
||||
mailboxPath: mailboxPath,
|
||||
state: newMailboxState
|
||||
);
|
||||
}
|
||||
|
||||
@@ -52,6 +72,7 @@ extension PresentationMailboxExtension on PresentationMailbox {
|
||||
isSubscribed: isSubscribed,
|
||||
mailboxPath: mailboxPath,
|
||||
selectMode: selectMode == SelectMode.INACTIVE ? SelectMode.ACTIVE : SelectMode.INACTIVE,
|
||||
state: state
|
||||
);
|
||||
}
|
||||
|
||||
@@ -70,6 +91,7 @@ extension PresentationMailboxExtension on PresentationMailbox {
|
||||
isSubscribed: isSubscribed,
|
||||
mailboxPath: mailboxPath,
|
||||
selectMode: selectMode,
|
||||
state: state
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
|
||||
enum MailboxState {
|
||||
activated,
|
||||
deactivated
|
||||
}
|
||||
@@ -2,6 +2,7 @@ import 'package:equatable/equatable.dart';
|
||||
import 'package:jmap_dart_client/jmap/core/id.dart';
|
||||
import 'package:jmap_dart_client/jmap/mail/mailbox/mailbox.dart';
|
||||
import 'package:jmap_dart_client/jmap/mail/mailbox/mailbox_rights.dart';
|
||||
import 'package:model/mailbox/mailbox_state.dart';
|
||||
import 'package:model/mailbox/select_mode.dart';
|
||||
|
||||
class PresentationMailbox with EquatableMixin {
|
||||
@@ -32,6 +33,7 @@ class PresentationMailbox with EquatableMixin {
|
||||
final IsSubscribed? isSubscribed;
|
||||
final SelectMode selectMode;
|
||||
final String? mailboxPath;
|
||||
final MailboxState? state;
|
||||
|
||||
PresentationMailbox(
|
||||
this.id,
|
||||
@@ -48,9 +50,12 @@ class PresentationMailbox with EquatableMixin {
|
||||
this.isSubscribed,
|
||||
this.selectMode = SelectMode.INACTIVE,
|
||||
this.mailboxPath,
|
||||
this.state = MailboxState.activated,
|
||||
}
|
||||
);
|
||||
|
||||
bool get isActivated => state == MailboxState.activated;
|
||||
|
||||
bool hasParentId() => parentId != null && parentId!.id.value.isNotEmpty;
|
||||
|
||||
bool hasRole() => role != null && role!.value.isNotEmpty;
|
||||
|
||||
@@ -58,6 +58,7 @@ export 'mailbox/expand_mode.dart';
|
||||
export 'mailbox/mailbox_property.dart';
|
||||
// Mailbox
|
||||
export 'mailbox/presentation_mailbox.dart';
|
||||
export 'mailbox/mailbox_state.dart';
|
||||
export 'mailbox/select_mode.dart';
|
||||
export 'oidc/oidc_configuration.dart';
|
||||
export 'oidc/request/oidc_request.dart';
|
||||
|
||||
Reference in New Issue
Block a user