From 11f75cfc19e14a9b4b8225b7ff4ddc3b7f259a05 Mon Sep 17 00:00:00 2001 From: jld3103 Date: Fri, 4 Aug 2023 10:49:05 +0200 Subject: [PATCH] refactor(neon,app): Drop unused loginName --- packages/app/integration_test/screenshot_test.dart | 2 -- packages/neon/neon/lib/src/blocs/login_check_account.dart | 1 - packages/neon/neon/lib/src/models/account.dart | 6 +----- 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/packages/app/integration_test/screenshot_test.dart b/packages/app/integration_test/screenshot_test.dart index a8f96aa8..f108b1c8 100644 --- a/packages/app/integration_test/screenshot_test.dart +++ b/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( diff --git a/packages/neon/neon/lib/src/blocs/login_check_account.dart b/packages/neon/neon/lib/src/blocs/login_check_account.dart index 94e1bef6..0a9a19aa 100644 --- a/packages/neon/neon/lib/src/blocs/login_check_account.dart +++ b/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, diff --git a/packages/neon/neon/lib/src/models/account.dart b/packages/neon/neon/lib/src/models/account.dart index b85c624d..7d413503 100644 --- a/packages/neon/neon/lib/src/models/account.dart +++ b/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;