TF-1311: set subscribeMailbox in UseCase and implement in Repository
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
enum MailboxSubscribeState {
|
||||
enabled,
|
||||
disabled;
|
||||
|
||||
String get keyValue {
|
||||
switch(this) {
|
||||
case MailboxSubscribeState.enabled:
|
||||
return 'enabled';
|
||||
case MailboxSubscribeState.disabled:
|
||||
return 'disabled';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:jmap_dart_client/jmap/mail/mailbox/mailbox.dart';
|
||||
import 'package:tmail_ui_user/features/mailbox/domain/model/mailbox_subscribe_state.dart';
|
||||
|
||||
class SubscribeMailboxRequest with EquatableMixin {
|
||||
|
||||
final MailboxId mailboxId;
|
||||
final MailboxSubscribeState newState;
|
||||
|
||||
SubscribeMailboxRequest(this.mailboxId, this.newState);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [mailboxId, newState];
|
||||
}
|
||||
Reference in New Issue
Block a user