Browse Source

refactor(neon,app): Drop unused loginName

pull/526/head
jld3103 1 year ago
parent
commit
11f75cfc19
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 2
      packages/app/integration_test/screenshot_test.dart
  2. 1
      packages/neon/neon/lib/src/blocs/login_check_account.dart
  3. 6
      packages/neon/neon/lib/src/models/account.dart

2
packages/app/integration_test/screenshot_test.dart

@ -129,7 +129,6 @@ Future main() async {
final binding = IntegrationTestWidgetsFlutterBinding.ensureInitialized();
final account = Account(
serverURL: 'http://10.0.2.2',
loginName: 'user1',
username: 'user1',
password: 'user1',
);
@ -346,7 +345,6 @@ Future main() async {
testWidgets('notifications', (final tester) async {
await Account(
serverURL: 'http://10.0.2.2',
loginName: 'admin',
username: 'admin',
password: 'admin',
).client.notifications.sendAdminNotification(

1
packages/neon/neon/lib/src/blocs/login_check_account.dart

@ -53,7 +53,6 @@ class LoginCheckAccountBloc extends InteractiveBloc
final account = Account(
serverURL: serverURL,
loginName: loginName,
username: response.ocs.data.id,
password: password,
userAgent: neonUserAgent,

6
packages/neon/neon/lib/src/models/account.dart

@ -27,14 +27,12 @@ abstract interface class Credentials {
class Account implements Credentials {
Account({
required this.serverURL,
required this.loginName,
required this.username,
this.password,
this.userAgent,
}) : _client = NextcloudClient(
serverURL,
loginName: loginName,
username: username,
loginName: username,
password: password,
userAgentOverride: userAgent,
cookieJar: CookieJar(),
@ -45,7 +43,6 @@ class Account implements Credentials {
@override
final String serverURL;
final String loginName;
@override
final String username;
@override
@ -56,7 +53,6 @@ class Account implements Credentials {
bool operator ==(final Object other) =>
other is Account &&
other.serverURL == serverURL &&
other.loginName == loginName &&
other.username == username &&
other.password == password &&
other.userAgent == userAgent;

Loading…
Cancel
Save