TF-1363: [Presentation] Implement disable and enable spam report
This commit is contained in:
+123
-75
@@ -3,25 +3,26 @@
|
||||
// Do not manually edit this file.
|
||||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'dart:async' as _i3;
|
||||
import 'dart:async' as _i4;
|
||||
|
||||
import 'package:jmap_dart_client/jmap/account_id.dart' as _i5;
|
||||
import 'package:jmap_dart_client/jmap/core/filter/filter.dart' as _i13;
|
||||
import 'package:jmap_dart_client/jmap/core/properties/properties.dart' as _i9;
|
||||
import 'package:jmap_dart_client/jmap/core/sort/comparator.dart' as _i7;
|
||||
import 'package:jmap_dart_client/jmap/core/state.dart' as _i10;
|
||||
import 'package:jmap_dart_client/jmap/core/unsigned_int.dart' as _i6;
|
||||
import 'package:jmap_dart_client/jmap/mail/email/email.dart' as _i12;
|
||||
import 'package:jmap_dart_client/jmap/mail/mailbox/mailbox.dart' as _i14;
|
||||
import 'package:jmap_dart_client/jmap/account_id.dart' as _i6;
|
||||
import 'package:jmap_dart_client/jmap/core/filter/filter.dart' as _i14;
|
||||
import 'package:jmap_dart_client/jmap/core/properties/properties.dart' as _i10;
|
||||
import 'package:jmap_dart_client/jmap/core/sort/comparator.dart' as _i8;
|
||||
import 'package:jmap_dart_client/jmap/core/state.dart' as _i11;
|
||||
import 'package:jmap_dart_client/jmap/core/unsigned_int.dart' as _i7;
|
||||
import 'package:jmap_dart_client/jmap/mail/email/email.dart' as _i13;
|
||||
import 'package:jmap_dart_client/jmap/mail/mailbox/mailbox.dart' as _i15;
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:model/email/presentation_email.dart' as _i2;
|
||||
import 'package:tmail_ui_user/features/thread/domain/model/email_filter.dart'
|
||||
as _i8;
|
||||
as _i9;
|
||||
import 'package:tmail_ui_user/features/thread/domain/model/email_response.dart'
|
||||
as _i4;
|
||||
as _i5;
|
||||
import 'package:tmail_ui_user/features/thread/domain/model/get_email_request.dart'
|
||||
as _i11;
|
||||
as _i12;
|
||||
import 'package:tmail_ui_user/features/thread/domain/repository/thread_repository.dart'
|
||||
as _i2;
|
||||
as _i3;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: avoid_redundant_argument_values
|
||||
@@ -33,80 +34,127 @@ import 'package:tmail_ui_user/features/thread/domain/repository/thread_repositor
|
||||
// ignore_for_file: unnecessary_parenthesis
|
||||
// ignore_for_file: camel_case_types
|
||||
|
||||
class _FakePresentationEmail_0 extends _i1.Fake
|
||||
implements _i2.PresentationEmail {}
|
||||
|
||||
/// A class which mocks [ThreadRepository].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockThreadRepository extends _i1.Mock implements _i2.ThreadRepository {
|
||||
class MockThreadRepository extends _i1.Mock implements _i3.ThreadRepository {
|
||||
MockThreadRepository() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
||||
@override
|
||||
_i3.Stream<_i4.EmailsResponse> getAllEmail(_i5.AccountId? accountId,
|
||||
{_i6.UnsignedInt? limit,
|
||||
Set<_i7.Comparator>? sort,
|
||||
_i8.EmailFilter? emailFilter,
|
||||
_i9.Properties? propertiesCreated,
|
||||
_i9.Properties? propertiesUpdated}) =>
|
||||
_i4.Stream<_i5.EmailsResponse> getAllEmail(
|
||||
_i6.AccountId? accountId, {
|
||||
_i7.UnsignedInt? limit,
|
||||
Set<_i8.Comparator>? sort,
|
||||
_i9.EmailFilter? emailFilter,
|
||||
_i10.Properties? propertiesCreated,
|
||||
_i10.Properties? propertiesUpdated,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getAllEmail, [
|
||||
accountId
|
||||
], {
|
||||
#limit: limit,
|
||||
#sort: sort,
|
||||
#emailFilter: emailFilter,
|
||||
#propertiesCreated: propertiesCreated,
|
||||
#propertiesUpdated: propertiesUpdated
|
||||
}),
|
||||
returnValue: Stream<_i4.EmailsResponse>.empty())
|
||||
as _i3.Stream<_i4.EmailsResponse>);
|
||||
Invocation.method(
|
||||
#getAllEmail,
|
||||
[accountId],
|
||||
{
|
||||
#limit: limit,
|
||||
#sort: sort,
|
||||
#emailFilter: emailFilter,
|
||||
#propertiesCreated: propertiesCreated,
|
||||
#propertiesUpdated: propertiesUpdated,
|
||||
},
|
||||
),
|
||||
returnValue: Stream<_i5.EmailsResponse>.empty(),
|
||||
) as _i4.Stream<_i5.EmailsResponse>);
|
||||
@override
|
||||
_i3.Stream<_i4.EmailsResponse> refreshChanges(
|
||||
_i5.AccountId? accountId, _i10.State? currentState,
|
||||
{Set<_i7.Comparator>? sort,
|
||||
_i8.EmailFilter? emailFilter,
|
||||
_i9.Properties? propertiesCreated,
|
||||
_i9.Properties? propertiesUpdated}) =>
|
||||
_i4.Stream<_i5.EmailsResponse> refreshChanges(
|
||||
_i6.AccountId? accountId,
|
||||
_i11.State? currentState, {
|
||||
Set<_i8.Comparator>? sort,
|
||||
_i9.EmailFilter? emailFilter,
|
||||
_i10.Properties? propertiesCreated,
|
||||
_i10.Properties? propertiesUpdated,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#refreshChanges, [
|
||||
accountId,
|
||||
currentState
|
||||
], {
|
||||
#sort: sort,
|
||||
#emailFilter: emailFilter,
|
||||
#propertiesCreated: propertiesCreated,
|
||||
#propertiesUpdated: propertiesUpdated
|
||||
}),
|
||||
returnValue: Stream<_i4.EmailsResponse>.empty())
|
||||
as _i3.Stream<_i4.EmailsResponse>);
|
||||
Invocation.method(
|
||||
#refreshChanges,
|
||||
[
|
||||
accountId,
|
||||
currentState,
|
||||
],
|
||||
{
|
||||
#sort: sort,
|
||||
#emailFilter: emailFilter,
|
||||
#propertiesCreated: propertiesCreated,
|
||||
#propertiesUpdated: propertiesUpdated,
|
||||
},
|
||||
),
|
||||
returnValue: Stream<_i5.EmailsResponse>.empty(),
|
||||
) as _i4.Stream<_i5.EmailsResponse>);
|
||||
@override
|
||||
_i3.Stream<_i4.EmailsResponse> loadMoreEmails(
|
||||
_i11.GetEmailRequest? emailRequest) =>
|
||||
(super.noSuchMethod(Invocation.method(#loadMoreEmails, [emailRequest]),
|
||||
returnValue: Stream<_i4.EmailsResponse>.empty())
|
||||
as _i3.Stream<_i4.EmailsResponse>);
|
||||
@override
|
||||
_i3.Future<List<_i12.Email>> searchEmails(_i5.AccountId? accountId,
|
||||
{_i6.UnsignedInt? limit,
|
||||
Set<_i7.Comparator>? sort,
|
||||
_i13.Filter? filter,
|
||||
_i9.Properties? properties}) =>
|
||||
_i4.Stream<_i5.EmailsResponse> loadMoreEmails(
|
||||
_i12.GetEmailRequest? emailRequest) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#searchEmails, [
|
||||
accountId
|
||||
], {
|
||||
#limit: limit,
|
||||
#sort: sort,
|
||||
#filter: filter,
|
||||
#properties: properties
|
||||
}),
|
||||
returnValue: Future<List<_i12.Email>>.value(<_i12.Email>[]))
|
||||
as _i3.Future<List<_i12.Email>>);
|
||||
Invocation.method(
|
||||
#loadMoreEmails,
|
||||
[emailRequest],
|
||||
),
|
||||
returnValue: Stream<_i5.EmailsResponse>.empty(),
|
||||
) as _i4.Stream<_i5.EmailsResponse>);
|
||||
@override
|
||||
_i3.Future<List<_i12.EmailId>> emptyTrashFolder(
|
||||
_i5.AccountId? accountId, _i14.MailboxId? trashMailboxId) =>
|
||||
_i4.Future<List<_i13.Email>> searchEmails(
|
||||
_i6.AccountId? accountId, {
|
||||
_i7.UnsignedInt? limit,
|
||||
Set<_i8.Comparator>? sort,
|
||||
_i14.Filter? filter,
|
||||
_i10.Properties? properties,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#emptyTrashFolder, [accountId, trashMailboxId]),
|
||||
returnValue: Future<List<_i12.EmailId>>.value(<_i12.EmailId>[]))
|
||||
as _i3.Future<List<_i12.EmailId>>);
|
||||
}
|
||||
Invocation.method(
|
||||
#searchEmails,
|
||||
[accountId],
|
||||
{
|
||||
#limit: limit,
|
||||
#sort: sort,
|
||||
#filter: filter,
|
||||
#properties: properties,
|
||||
},
|
||||
),
|
||||
returnValue: Future<List<_i13.Email>>.value(<_i13.Email>[]),
|
||||
) as _i4.Future<List<_i13.Email>>);
|
||||
@override
|
||||
_i4.Future<List<_i13.EmailId>> emptyTrashFolder(
|
||||
_i6.AccountId? accountId,
|
||||
_i15.MailboxId? trashMailboxId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#emptyTrashFolder,
|
||||
[
|
||||
accountId,
|
||||
trashMailboxId,
|
||||
],
|
||||
),
|
||||
returnValue: Future<List<_i13.EmailId>>.value(<_i13.EmailId>[]),
|
||||
) as _i4.Future<List<_i13.EmailId>>);
|
||||
@override
|
||||
_i4.Future<_i2.PresentationEmail> getEmailById(
|
||||
_i6.AccountId? accountId,
|
||||
_i13.EmailId? emailId, {
|
||||
_i10.Properties? properties,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getEmailById,
|
||||
[
|
||||
accountId,
|
||||
emailId,
|
||||
],
|
||||
{#properties: properties},
|
||||
),
|
||||
returnValue:
|
||||
Future<_i2.PresentationEmail>.value(_FakePresentationEmail_0()),
|
||||
) as _i4.Future<_i2.PresentationEmail>);
|
||||
}
|
||||
|
||||
+123
-75
@@ -3,25 +3,26 @@
|
||||
// Do not manually edit this file.
|
||||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'dart:async' as _i3;
|
||||
import 'dart:async' as _i4;
|
||||
|
||||
import 'package:jmap_dart_client/jmap/account_id.dart' as _i5;
|
||||
import 'package:jmap_dart_client/jmap/core/filter/filter.dart' as _i13;
|
||||
import 'package:jmap_dart_client/jmap/core/properties/properties.dart' as _i9;
|
||||
import 'package:jmap_dart_client/jmap/core/sort/comparator.dart' as _i7;
|
||||
import 'package:jmap_dart_client/jmap/core/state.dart' as _i10;
|
||||
import 'package:jmap_dart_client/jmap/core/unsigned_int.dart' as _i6;
|
||||
import 'package:jmap_dart_client/jmap/mail/email/email.dart' as _i12;
|
||||
import 'package:jmap_dart_client/jmap/mail/mailbox/mailbox.dart' as _i14;
|
||||
import 'package:jmap_dart_client/jmap/account_id.dart' as _i6;
|
||||
import 'package:jmap_dart_client/jmap/core/filter/filter.dart' as _i14;
|
||||
import 'package:jmap_dart_client/jmap/core/properties/properties.dart' as _i10;
|
||||
import 'package:jmap_dart_client/jmap/core/sort/comparator.dart' as _i8;
|
||||
import 'package:jmap_dart_client/jmap/core/state.dart' as _i11;
|
||||
import 'package:jmap_dart_client/jmap/core/unsigned_int.dart' as _i7;
|
||||
import 'package:jmap_dart_client/jmap/mail/email/email.dart' as _i13;
|
||||
import 'package:jmap_dart_client/jmap/mail/mailbox/mailbox.dart' as _i15;
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:model/email/presentation_email.dart' as _i2;
|
||||
import 'package:tmail_ui_user/features/thread/domain/model/email_filter.dart'
|
||||
as _i8;
|
||||
as _i9;
|
||||
import 'package:tmail_ui_user/features/thread/domain/model/email_response.dart'
|
||||
as _i4;
|
||||
as _i5;
|
||||
import 'package:tmail_ui_user/features/thread/domain/model/get_email_request.dart'
|
||||
as _i11;
|
||||
as _i12;
|
||||
import 'package:tmail_ui_user/features/thread/domain/repository/thread_repository.dart'
|
||||
as _i2;
|
||||
as _i3;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: avoid_redundant_argument_values
|
||||
@@ -33,80 +34,127 @@ import 'package:tmail_ui_user/features/thread/domain/repository/thread_repositor
|
||||
// ignore_for_file: unnecessary_parenthesis
|
||||
// ignore_for_file: camel_case_types
|
||||
|
||||
class _FakePresentationEmail_0 extends _i1.Fake
|
||||
implements _i2.PresentationEmail {}
|
||||
|
||||
/// A class which mocks [ThreadRepository].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockThreadRepository extends _i1.Mock implements _i2.ThreadRepository {
|
||||
class MockThreadRepository extends _i1.Mock implements _i3.ThreadRepository {
|
||||
MockThreadRepository() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
||||
@override
|
||||
_i3.Stream<_i4.EmailsResponse> getAllEmail(_i5.AccountId? accountId,
|
||||
{_i6.UnsignedInt? limit,
|
||||
Set<_i7.Comparator>? sort,
|
||||
_i8.EmailFilter? emailFilter,
|
||||
_i9.Properties? propertiesCreated,
|
||||
_i9.Properties? propertiesUpdated}) =>
|
||||
_i4.Stream<_i5.EmailsResponse> getAllEmail(
|
||||
_i6.AccountId? accountId, {
|
||||
_i7.UnsignedInt? limit,
|
||||
Set<_i8.Comparator>? sort,
|
||||
_i9.EmailFilter? emailFilter,
|
||||
_i10.Properties? propertiesCreated,
|
||||
_i10.Properties? propertiesUpdated,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getAllEmail, [
|
||||
accountId
|
||||
], {
|
||||
#limit: limit,
|
||||
#sort: sort,
|
||||
#emailFilter: emailFilter,
|
||||
#propertiesCreated: propertiesCreated,
|
||||
#propertiesUpdated: propertiesUpdated
|
||||
}),
|
||||
returnValue: Stream<_i4.EmailsResponse>.empty())
|
||||
as _i3.Stream<_i4.EmailsResponse>);
|
||||
Invocation.method(
|
||||
#getAllEmail,
|
||||
[accountId],
|
||||
{
|
||||
#limit: limit,
|
||||
#sort: sort,
|
||||
#emailFilter: emailFilter,
|
||||
#propertiesCreated: propertiesCreated,
|
||||
#propertiesUpdated: propertiesUpdated,
|
||||
},
|
||||
),
|
||||
returnValue: Stream<_i5.EmailsResponse>.empty(),
|
||||
) as _i4.Stream<_i5.EmailsResponse>);
|
||||
@override
|
||||
_i3.Stream<_i4.EmailsResponse> refreshChanges(
|
||||
_i5.AccountId? accountId, _i10.State? currentState,
|
||||
{Set<_i7.Comparator>? sort,
|
||||
_i8.EmailFilter? emailFilter,
|
||||
_i9.Properties? propertiesCreated,
|
||||
_i9.Properties? propertiesUpdated}) =>
|
||||
_i4.Stream<_i5.EmailsResponse> refreshChanges(
|
||||
_i6.AccountId? accountId,
|
||||
_i11.State? currentState, {
|
||||
Set<_i8.Comparator>? sort,
|
||||
_i9.EmailFilter? emailFilter,
|
||||
_i10.Properties? propertiesCreated,
|
||||
_i10.Properties? propertiesUpdated,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#refreshChanges, [
|
||||
accountId,
|
||||
currentState
|
||||
], {
|
||||
#sort: sort,
|
||||
#emailFilter: emailFilter,
|
||||
#propertiesCreated: propertiesCreated,
|
||||
#propertiesUpdated: propertiesUpdated
|
||||
}),
|
||||
returnValue: Stream<_i4.EmailsResponse>.empty())
|
||||
as _i3.Stream<_i4.EmailsResponse>);
|
||||
Invocation.method(
|
||||
#refreshChanges,
|
||||
[
|
||||
accountId,
|
||||
currentState,
|
||||
],
|
||||
{
|
||||
#sort: sort,
|
||||
#emailFilter: emailFilter,
|
||||
#propertiesCreated: propertiesCreated,
|
||||
#propertiesUpdated: propertiesUpdated,
|
||||
},
|
||||
),
|
||||
returnValue: Stream<_i5.EmailsResponse>.empty(),
|
||||
) as _i4.Stream<_i5.EmailsResponse>);
|
||||
@override
|
||||
_i3.Stream<_i4.EmailsResponse> loadMoreEmails(
|
||||
_i11.GetEmailRequest? emailRequest) =>
|
||||
(super.noSuchMethod(Invocation.method(#loadMoreEmails, [emailRequest]),
|
||||
returnValue: Stream<_i4.EmailsResponse>.empty())
|
||||
as _i3.Stream<_i4.EmailsResponse>);
|
||||
@override
|
||||
_i3.Future<List<_i12.Email>> searchEmails(_i5.AccountId? accountId,
|
||||
{_i6.UnsignedInt? limit,
|
||||
Set<_i7.Comparator>? sort,
|
||||
_i13.Filter? filter,
|
||||
_i9.Properties? properties}) =>
|
||||
_i4.Stream<_i5.EmailsResponse> loadMoreEmails(
|
||||
_i12.GetEmailRequest? emailRequest) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#searchEmails, [
|
||||
accountId
|
||||
], {
|
||||
#limit: limit,
|
||||
#sort: sort,
|
||||
#filter: filter,
|
||||
#properties: properties
|
||||
}),
|
||||
returnValue: Future<List<_i12.Email>>.value(<_i12.Email>[]))
|
||||
as _i3.Future<List<_i12.Email>>);
|
||||
Invocation.method(
|
||||
#loadMoreEmails,
|
||||
[emailRequest],
|
||||
),
|
||||
returnValue: Stream<_i5.EmailsResponse>.empty(),
|
||||
) as _i4.Stream<_i5.EmailsResponse>);
|
||||
@override
|
||||
_i3.Future<List<_i12.EmailId>> emptyTrashFolder(
|
||||
_i5.AccountId? accountId, _i14.MailboxId? trashMailboxId) =>
|
||||
_i4.Future<List<_i13.Email>> searchEmails(
|
||||
_i6.AccountId? accountId, {
|
||||
_i7.UnsignedInt? limit,
|
||||
Set<_i8.Comparator>? sort,
|
||||
_i14.Filter? filter,
|
||||
_i10.Properties? properties,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#emptyTrashFolder, [accountId, trashMailboxId]),
|
||||
returnValue: Future<List<_i12.EmailId>>.value(<_i12.EmailId>[]))
|
||||
as _i3.Future<List<_i12.EmailId>>);
|
||||
}
|
||||
Invocation.method(
|
||||
#searchEmails,
|
||||
[accountId],
|
||||
{
|
||||
#limit: limit,
|
||||
#sort: sort,
|
||||
#filter: filter,
|
||||
#properties: properties,
|
||||
},
|
||||
),
|
||||
returnValue: Future<List<_i13.Email>>.value(<_i13.Email>[]),
|
||||
) as _i4.Future<List<_i13.Email>>);
|
||||
@override
|
||||
_i4.Future<List<_i13.EmailId>> emptyTrashFolder(
|
||||
_i6.AccountId? accountId,
|
||||
_i15.MailboxId? trashMailboxId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#emptyTrashFolder,
|
||||
[
|
||||
accountId,
|
||||
trashMailboxId,
|
||||
],
|
||||
),
|
||||
returnValue: Future<List<_i13.EmailId>>.value(<_i13.EmailId>[]),
|
||||
) as _i4.Future<List<_i13.EmailId>>);
|
||||
@override
|
||||
_i4.Future<_i2.PresentationEmail> getEmailById(
|
||||
_i6.AccountId? accountId,
|
||||
_i13.EmailId? emailId, {
|
||||
_i10.Properties? properties,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getEmailById,
|
||||
[
|
||||
accountId,
|
||||
emailId,
|
||||
],
|
||||
{#properties: properties},
|
||||
),
|
||||
returnValue:
|
||||
Future<_i2.PresentationEmail>.value(_FakePresentationEmail_0()),
|
||||
) as _i4.Future<_i2.PresentationEmail>);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user