feat: add 'Create new folder' option to Move To Folder dialog (#423)
This commit was merged in pull request #423.
This commit is contained in:
@@ -169,6 +169,15 @@ class _FakeMailboxes implements MailboxRepository {
|
||||
unreadCount: 0,
|
||||
totalCount: 0,
|
||||
);
|
||||
@override
|
||||
Future<Mailbox> createMailbox(String accountId, String name) async => Mailbox(
|
||||
id: '$accountId:$name',
|
||||
accountId: accountId,
|
||||
path: name,
|
||||
name: name,
|
||||
unreadCount: 0,
|
||||
totalCount: 0,
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeEmails implements EmailRepository {
|
||||
|
||||
@@ -239,6 +239,15 @@ class FakeMailboxRepositoryWithInbox implements MailboxRepository {
|
||||
unreadCount: 0,
|
||||
totalCount: 0,
|
||||
);
|
||||
@override
|
||||
Future<Mailbox> createMailbox(String accountId, String name) async => Mailbox(
|
||||
id: '$accountId:$name',
|
||||
accountId: accountId,
|
||||
path: name,
|
||||
name: name,
|
||||
unreadCount: 0,
|
||||
totalCount: 0,
|
||||
);
|
||||
}
|
||||
|
||||
class _AccountRepositoryWithMissingPlugin implements AccountRepository {
|
||||
|
||||
@@ -235,6 +235,31 @@ class MockMailboxRepository extends _i1.Mock implements _i8.MailboxRepository {
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.Mailbox>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.Mailbox> createMailbox(
|
||||
String? accountId,
|
||||
String? name,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#createMailbox,
|
||||
[
|
||||
accountId,
|
||||
name,
|
||||
],
|
||||
),
|
||||
returnValue: _i5.Future<_i2.Mailbox>.value(_FakeMailbox_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#createMailbox,
|
||||
[
|
||||
accountId,
|
||||
name,
|
||||
],
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.Mailbox>);
|
||||
}
|
||||
|
||||
/// A class which mocks [EmailRepository].
|
||||
|
||||
@@ -77,6 +77,15 @@ class _FakeMailboxes implements MailboxRepository {
|
||||
unreadCount: 0,
|
||||
totalCount: 0,
|
||||
);
|
||||
@override
|
||||
Future<Mailbox> createMailbox(String accountId, String name) async => Mailbox(
|
||||
id: '$accountId:$name',
|
||||
accountId: accountId,
|
||||
path: name,
|
||||
name: name,
|
||||
unreadCount: 0,
|
||||
totalCount: 0,
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeEmails implements EmailRepository {
|
||||
|
||||
@@ -67,6 +67,15 @@ class _FakeMailboxes implements MailboxRepository {
|
||||
unreadCount: 0,
|
||||
totalCount: 0,
|
||||
);
|
||||
@override
|
||||
Future<Mailbox> createMailbox(String accountId, String name) async => Mailbox(
|
||||
id: '$accountId:$name',
|
||||
accountId: accountId,
|
||||
path: name,
|
||||
name: name,
|
||||
unreadCount: 0,
|
||||
totalCount: 0,
|
||||
);
|
||||
}
|
||||
|
||||
class _CountingEmails implements EmailRepository {
|
||||
|
||||
@@ -192,6 +192,20 @@ class FakeMailboxRepository implements MailboxRepository {
|
||||
_mailboxes.add(mailbox);
|
||||
return mailbox;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<Mailbox> createMailbox(String accountId, String name) async {
|
||||
final mailbox = Mailbox(
|
||||
id: '$accountId:$name',
|
||||
accountId: accountId,
|
||||
path: name,
|
||||
name: name,
|
||||
unreadCount: 0,
|
||||
totalCount: 0,
|
||||
);
|
||||
_mailboxes.add(mailbox);
|
||||
return mailbox;
|
||||
}
|
||||
}
|
||||
|
||||
class FakeEmailRepository implements EmailRepository {
|
||||
|
||||
Reference in New Issue
Block a user