diff --git a/packages/app/android/app/src/main/res/mipmap-hdpi/app_files.png b/packages/app/android/app/src/main/res/mipmap-hdpi/app_files.png deleted file mode 100644 index 8f8385c2..00000000 Binary files a/packages/app/android/app/src/main/res/mipmap-hdpi/app_files.png and /dev/null differ diff --git a/packages/app/android/app/src/main/res/mipmap-hdpi/app_news.png b/packages/app/android/app/src/main/res/mipmap-hdpi/app_news.png deleted file mode 100644 index aa9b7b35..00000000 Binary files a/packages/app/android/app/src/main/res/mipmap-hdpi/app_news.png and /dev/null differ diff --git a/packages/app/android/app/src/main/res/mipmap-hdpi/app_notes.png b/packages/app/android/app/src/main/res/mipmap-hdpi/app_notes.png deleted file mode 100644 index fb16e672..00000000 Binary files a/packages/app/android/app/src/main/res/mipmap-hdpi/app_notes.png and /dev/null differ diff --git a/packages/app/android/app/src/main/res/mipmap-hdpi/app_notifications.png b/packages/app/android/app/src/main/res/mipmap-hdpi/app_notifications.png deleted file mode 100644 index 52112ad9..00000000 Binary files a/packages/app/android/app/src/main/res/mipmap-hdpi/app_notifications.png and /dev/null differ diff --git a/packages/app/android/app/src/main/res/mipmap-mdpi/app_files.png b/packages/app/android/app/src/main/res/mipmap-mdpi/app_files.png deleted file mode 100644 index f1e6caa3..00000000 Binary files a/packages/app/android/app/src/main/res/mipmap-mdpi/app_files.png and /dev/null differ diff --git a/packages/app/android/app/src/main/res/mipmap-mdpi/app_news.png b/packages/app/android/app/src/main/res/mipmap-mdpi/app_news.png deleted file mode 100644 index 08aea4c3..00000000 Binary files a/packages/app/android/app/src/main/res/mipmap-mdpi/app_news.png and /dev/null differ diff --git a/packages/app/android/app/src/main/res/mipmap-mdpi/app_notes.png b/packages/app/android/app/src/main/res/mipmap-mdpi/app_notes.png deleted file mode 100644 index d372d23d..00000000 Binary files a/packages/app/android/app/src/main/res/mipmap-mdpi/app_notes.png and /dev/null differ diff --git a/packages/app/android/app/src/main/res/mipmap-mdpi/app_notifications.png b/packages/app/android/app/src/main/res/mipmap-mdpi/app_notifications.png deleted file mode 100644 index 83757de5..00000000 Binary files a/packages/app/android/app/src/main/res/mipmap-mdpi/app_notifications.png and /dev/null differ diff --git a/packages/app/android/app/src/main/res/mipmap-xhdpi/app_files.png b/packages/app/android/app/src/main/res/mipmap-xhdpi/app_files.png deleted file mode 100644 index 1d4d46d7..00000000 Binary files a/packages/app/android/app/src/main/res/mipmap-xhdpi/app_files.png and /dev/null differ diff --git a/packages/app/android/app/src/main/res/mipmap-xhdpi/app_news.png b/packages/app/android/app/src/main/res/mipmap-xhdpi/app_news.png deleted file mode 100644 index bdfb9c28..00000000 Binary files a/packages/app/android/app/src/main/res/mipmap-xhdpi/app_news.png and /dev/null differ diff --git a/packages/app/android/app/src/main/res/mipmap-xhdpi/app_notes.png b/packages/app/android/app/src/main/res/mipmap-xhdpi/app_notes.png deleted file mode 100644 index 1d310cba..00000000 Binary files a/packages/app/android/app/src/main/res/mipmap-xhdpi/app_notes.png and /dev/null differ diff --git a/packages/app/android/app/src/main/res/mipmap-xhdpi/app_notifications.png b/packages/app/android/app/src/main/res/mipmap-xhdpi/app_notifications.png deleted file mode 100644 index b117ac90..00000000 Binary files a/packages/app/android/app/src/main/res/mipmap-xhdpi/app_notifications.png and /dev/null differ diff --git a/packages/app/android/app/src/main/res/mipmap-xxhdpi/app_files.png b/packages/app/android/app/src/main/res/mipmap-xxhdpi/app_files.png deleted file mode 100644 index f00e483b..00000000 Binary files a/packages/app/android/app/src/main/res/mipmap-xxhdpi/app_files.png and /dev/null differ diff --git a/packages/app/android/app/src/main/res/mipmap-xxhdpi/app_news.png b/packages/app/android/app/src/main/res/mipmap-xxhdpi/app_news.png deleted file mode 100644 index de4c090e..00000000 Binary files a/packages/app/android/app/src/main/res/mipmap-xxhdpi/app_news.png and /dev/null differ diff --git a/packages/app/android/app/src/main/res/mipmap-xxhdpi/app_notes.png b/packages/app/android/app/src/main/res/mipmap-xxhdpi/app_notes.png deleted file mode 100644 index 5c02272e..00000000 Binary files a/packages/app/android/app/src/main/res/mipmap-xxhdpi/app_notes.png and /dev/null differ diff --git a/packages/app/android/app/src/main/res/mipmap-xxhdpi/app_notifications.png b/packages/app/android/app/src/main/res/mipmap-xxhdpi/app_notifications.png deleted file mode 100644 index c6cad23a..00000000 Binary files a/packages/app/android/app/src/main/res/mipmap-xxhdpi/app_notifications.png and /dev/null differ diff --git a/packages/app/android/app/src/main/res/mipmap-xxxhdpi/app_files.png b/packages/app/android/app/src/main/res/mipmap-xxxhdpi/app_files.png deleted file mode 100644 index 0b8e34b4..00000000 Binary files a/packages/app/android/app/src/main/res/mipmap-xxxhdpi/app_files.png and /dev/null differ diff --git a/packages/app/android/app/src/main/res/mipmap-xxxhdpi/app_news.png b/packages/app/android/app/src/main/res/mipmap-xxxhdpi/app_news.png deleted file mode 100644 index 57f72f48..00000000 Binary files a/packages/app/android/app/src/main/res/mipmap-xxxhdpi/app_news.png and /dev/null differ diff --git a/packages/app/android/app/src/main/res/mipmap-xxxhdpi/app_notes.png b/packages/app/android/app/src/main/res/mipmap-xxxhdpi/app_notes.png deleted file mode 100644 index 3a6f1ceb..00000000 Binary files a/packages/app/android/app/src/main/res/mipmap-xxxhdpi/app_notes.png and /dev/null differ diff --git a/packages/app/android/app/src/main/res/mipmap-xxxhdpi/app_notifications.png b/packages/app/android/app/src/main/res/mipmap-xxxhdpi/app_notifications.png deleted file mode 100644 index 6544a81c..00000000 Binary files a/packages/app/android/app/src/main/res/mipmap-xxxhdpi/app_notifications.png and /dev/null differ diff --git a/packages/neon/neon/lib/src/utils/push_utils.dart b/packages/neon/neon/lib/src/utils/push_utils.dart index 7a5a24c3..b1cc823b 100644 --- a/packages/neon/neon/lib/src/utils/push_utils.dart +++ b/packages/neon/neon/lib/src/utils/push_utils.dart @@ -75,23 +75,11 @@ class PushUtils { final platform = await getNeonPlatform(); final cache = Cache(platform); await cache.init(); - //final requestManager = RequestManager(cache); - //final allAppImplementations = getAppImplementations(sharedPreferences, requestManager, platform); - final allAppImplementations = []; - final matchingAppImplementations = - allAppImplementations.where((final a) => a.id == notification.subject.app).toList(); - AppImplementation? app; - if (matchingAppImplementations.isNotEmpty) { - app = matchingAppImplementations.single; - } else { - app = allAppImplementations.firstWhereOrNull((final a) => a.id == 'notifications'); - } - - final appID = app?.id ?? notification.subject.app; - var appName = localizations.appImplementationName(appID ?? ''); + var appName = localizations.appImplementationName(notification.subject.app ?? ''); if (appName == '') { - appName = appID ?? 'Nextcloud'; + debugPrint('Missing app name for ${notification.subject.app}'); + appName = notification.subject.app ?? 'Nextcloud'; } await localNotificationsPlugin.show( @@ -103,7 +91,7 @@ class PushUtils { notification.subject.app ?? 'nextcloud', appName, groupKey: notification.subject.app != null ? 'app_${notification.subject.app}' : 'nextcloud', - icon: '@mipmap/${app != null ? 'app_${app.id}' : 'ic_launcher'}', + icon: '@mipmap/ic_launcher', color: themePrimaryColor, category: notification.type == 'voip' ? AndroidNotificationCategory.call : null, importance: Importance.max, diff --git a/tool/generate-neon.sh b/tool/generate-neon.sh index f6ddce33..03fb5c92 100755 --- a/tool/generate-neon.sh +++ b/tool/generate-neon.sh @@ -70,10 +70,6 @@ copy_nextcloud_app_svg notifications external/nextcloud-notifications # Android launcher icons export_mipmap_icon_all "assets/logo.svg" "ic_launcher" & - for id in files news notes notifications; do - export_mipmap_icon_all "../neon/neon_$id/assets/app.svg" "app_$id" & - done - wait fvm dart run flutter_native_splash:create )