From 77ad07a7af85b8ef57b7662306ad1d72b0f21bf1 Mon Sep 17 00:00:00 2001 From: jld3103 Date: Fri, 29 Sep 2023 07:05:43 +0200 Subject: [PATCH] refactor(nextcloud): Move app type to client Signed-off-by: jld3103 --- packages/nextcloud/lib/nextcloud.dart | 1 - packages/nextcloud/lib/src/app_type.dart | 18 ------------------ packages/nextcloud/lib/src/client.dart | 19 +++++++++++++++++++ 3 files changed, 19 insertions(+), 19 deletions(-) delete mode 100644 packages/nextcloud/lib/src/app_type.dart diff --git a/packages/nextcloud/lib/nextcloud.dart b/packages/nextcloud/lib/nextcloud.dart index 1a34fc93..a9f0872d 100644 --- a/packages/nextcloud/lib/nextcloud.dart +++ b/packages/nextcloud/lib/nextcloud.dart @@ -21,7 +21,6 @@ export 'src/api/updatenotification.openapi.dart'; export 'src/api/uppush.openapi.dart'; export 'src/api/user_status.openapi.dart'; export 'src/api/weather_status.openapi.dart'; -export 'src/app_type.dart'; export 'src/client.dart'; export 'src/helpers/core.dart'; export 'src/helpers/news.dart'; diff --git a/packages/nextcloud/lib/src/app_type.dart b/packages/nextcloud/lib/src/app_type.dart deleted file mode 100644 index a71771da..00000000 --- a/packages/nextcloud/lib/src/app_type.dart +++ /dev/null @@ -1,18 +0,0 @@ -/// Different app types to register for -enum AppType { - /// Will only receive Talk notifications - talk('Mozilla/5.0 (Android) Nextcloud-Talk'), - - /// Will receive all notifications except Talk notifications if another Talk - /// app is already registered for the user - nextcloud('Mozilla/5.0 (Android) Nextcloud-android'), - - /// Default. Same problem with notifications as the [nextcloud] type - unknown(null); - - // ignore: public_member_api_docs - const AppType(this.userAgent); - - // ignore: public_member_api_docs - final String? userAgent; -} diff --git a/packages/nextcloud/lib/src/client.dart b/packages/nextcloud/lib/src/client.dart index c42c66ca..b19246f7 100644 --- a/packages/nextcloud/lib/src/client.dart +++ b/packages/nextcloud/lib/src/client.dart @@ -1,5 +1,24 @@ import 'package:nextcloud/nextcloud.dart'; +/// Different app types to register for +enum AppType { + /// Will only receive Talk notifications + talk('Mozilla/5.0 (Android) Nextcloud-Talk'), + + /// Will receive all notifications except Talk notifications if another Talk + /// app is already registered for the user + nextcloud('Mozilla/5.0 (Android) Nextcloud-android'), + + /// Default. Same problem with notifications as the [nextcloud] type + unknown(null); + + // ignore: public_member_api_docs + const AppType(this.userAgent); + + // ignore: public_member_api_docs + final String? userAgent; +} + // ignore: public_member_api_docs class NextcloudClient extends DynamiteClient { // ignore: public_member_api_docs