Browse Source

tool,neon,app: Remove unused notification icons

pull/258/head
jld3103 2 years ago
parent
commit
8757f33644
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. BIN
      packages/app/android/app/src/main/res/mipmap-hdpi/app_files.png
  2. BIN
      packages/app/android/app/src/main/res/mipmap-hdpi/app_news.png
  3. BIN
      packages/app/android/app/src/main/res/mipmap-hdpi/app_notes.png
  4. BIN
      packages/app/android/app/src/main/res/mipmap-hdpi/app_notifications.png
  5. BIN
      packages/app/android/app/src/main/res/mipmap-mdpi/app_files.png
  6. BIN
      packages/app/android/app/src/main/res/mipmap-mdpi/app_news.png
  7. BIN
      packages/app/android/app/src/main/res/mipmap-mdpi/app_notes.png
  8. BIN
      packages/app/android/app/src/main/res/mipmap-mdpi/app_notifications.png
  9. BIN
      packages/app/android/app/src/main/res/mipmap-xhdpi/app_files.png
  10. BIN
      packages/app/android/app/src/main/res/mipmap-xhdpi/app_news.png
  11. BIN
      packages/app/android/app/src/main/res/mipmap-xhdpi/app_notes.png
  12. BIN
      packages/app/android/app/src/main/res/mipmap-xhdpi/app_notifications.png
  13. BIN
      packages/app/android/app/src/main/res/mipmap-xxhdpi/app_files.png
  14. BIN
      packages/app/android/app/src/main/res/mipmap-xxhdpi/app_news.png
  15. BIN
      packages/app/android/app/src/main/res/mipmap-xxhdpi/app_notes.png
  16. BIN
      packages/app/android/app/src/main/res/mipmap-xxhdpi/app_notifications.png
  17. BIN
      packages/app/android/app/src/main/res/mipmap-xxxhdpi/app_files.png
  18. BIN
      packages/app/android/app/src/main/res/mipmap-xxxhdpi/app_news.png
  19. BIN
      packages/app/android/app/src/main/res/mipmap-xxxhdpi/app_notes.png
  20. BIN
      packages/app/android/app/src/main/res/mipmap-xxxhdpi/app_notifications.png
  21. 20
      packages/neon/neon/lib/src/utils/push_utils.dart
  22. 4
      tool/generate-neon.sh

BIN
packages/app/android/app/src/main/res/mipmap-hdpi/app_files.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 499 B

BIN
packages/app/android/app/src/main/res/mipmap-hdpi/app_news.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 602 B

BIN
packages/app/android/app/src/main/res/mipmap-hdpi/app_notes.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 859 B

BIN
packages/app/android/app/src/main/res/mipmap-hdpi/app_notifications.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

BIN
packages/app/android/app/src/main/res/mipmap-mdpi/app_files.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 337 B

BIN
packages/app/android/app/src/main/res/mipmap-mdpi/app_news.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 377 B

BIN
packages/app/android/app/src/main/res/mipmap-mdpi/app_notes.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 687 B

BIN
packages/app/android/app/src/main/res/mipmap-mdpi/app_notifications.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 724 B

BIN
packages/app/android/app/src/main/res/mipmap-xhdpi/app_files.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 583 B

BIN
packages/app/android/app/src/main/res/mipmap-xhdpi/app_news.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 624 B

BIN
packages/app/android/app/src/main/res/mipmap-xhdpi/app_notes.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 995 B

BIN
packages/app/android/app/src/main/res/mipmap-xhdpi/app_notifications.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

BIN
packages/app/android/app/src/main/res/mipmap-xxhdpi/app_files.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 843 B

BIN
packages/app/android/app/src/main/res/mipmap-xxhdpi/app_news.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 910 B

BIN
packages/app/android/app/src/main/res/mipmap-xxhdpi/app_notes.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

BIN
packages/app/android/app/src/main/res/mipmap-xxhdpi/app_notifications.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

BIN
packages/app/android/app/src/main/res/mipmap-xxxhdpi/app_files.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

BIN
packages/app/android/app/src/main/res/mipmap-xxxhdpi/app_news.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

BIN
packages/app/android/app/src/main/res/mipmap-xxxhdpi/app_notes.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

BIN
packages/app/android/app/src/main/res/mipmap-xxxhdpi/app_notifications.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

20
packages/neon/neon/lib/src/utils/push_utils.dart

@ -75,23 +75,11 @@ class PushUtils {
final platform = await getNeonPlatform(); final platform = await getNeonPlatform();
final cache = Cache(platform); final cache = Cache(platform);
await cache.init(); await cache.init();
//final requestManager = RequestManager(cache);
//final allAppImplementations = getAppImplementations(sharedPreferences, requestManager, platform);
final allAppImplementations = <AppImplementation>[];
final matchingAppImplementations = var appName = localizations.appImplementationName(notification.subject.app ?? '');
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 ?? '');
if (appName == '') { if (appName == '') {
appName = appID ?? 'Nextcloud'; debugPrint('Missing app name for ${notification.subject.app}');
appName = notification.subject.app ?? 'Nextcloud';
} }
await localNotificationsPlugin.show( await localNotificationsPlugin.show(
@ -103,7 +91,7 @@ class PushUtils {
notification.subject.app ?? 'nextcloud', notification.subject.app ?? 'nextcloud',
appName, appName,
groupKey: notification.subject.app != null ? 'app_${notification.subject.app}' : 'nextcloud', 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, color: themePrimaryColor,
category: notification.type == 'voip' ? AndroidNotificationCategory.call : null, category: notification.type == 'voip' ? AndroidNotificationCategory.call : null,
importance: Importance.max, importance: Importance.max,

4
tool/generate-neon.sh

@ -70,10 +70,6 @@ copy_nextcloud_app_svg notifications external/nextcloud-notifications
# Android launcher icons # Android launcher icons
export_mipmap_icon_all "assets/logo.svg" "ic_launcher" & 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 fvm dart run flutter_native_splash:create
) )

Loading…
Cancel
Save