From 96680fdeca0f586977532d1e144557d73dcd644f Mon Sep 17 00:00:00 2001 From: Andy Scherzinger Date: Wed, 21 Oct 2020 23:00:16 +0200 Subject: [PATCH] proper kotlin enum naming pattern Signed-off-by: Andy Scherzinger --- .../owncloud/android/ui/fragment/AvatarIT.kt | 28 +++++++++---------- .../nextcloud/client/account/StatusType.kt | 2 +- .../UsersAndGroupsSearchProvider.java | 2 +- .../owncloud/android/utils/BitmapUtils.java | 6 ++-- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/androidTest/java/com/owncloud/android/ui/fragment/AvatarIT.kt b/src/androidTest/java/com/owncloud/android/ui/fragment/AvatarIT.kt index 9aa49d24b6..735c67a1b9 100644 --- a/src/androidTest/java/com/owncloud/android/ui/fragment/AvatarIT.kt +++ b/src/androidTest/java/com/owncloud/android/ui/fragment/AvatarIT.kt @@ -80,98 +80,98 @@ class AvatarIT : AbstractIT() { runOnUiThread { fragment.addBitmap( - BitmapUtils.createAvatarWithStatus(paulette, StatusType.online, "😘", targetContext), + BitmapUtils.createAvatarWithStatus(paulette, StatusType.Online, "😘", targetContext), width * 2, 1, targetContext ) fragment.addBitmap( - BitmapUtils.createAvatarWithStatus(christine, StatusType.online, "☁️", targetContext), + BitmapUtils.createAvatarWithStatus(christine, StatusType.Online, "☁️", targetContext), width * 2, 1, targetContext ) fragment.addBitmap( - BitmapUtils.createAvatarWithStatus(christine, StatusType.online, "🌴️", targetContext), + BitmapUtils.createAvatarWithStatus(christine, StatusType.Online, "🌴️", targetContext), width * 2, 1, targetContext ) fragment.addBitmap( - BitmapUtils.createAvatarWithStatus(christine, StatusType.online, "", targetContext), + BitmapUtils.createAvatarWithStatus(christine, StatusType.Online, "", targetContext), width * 2, 1, targetContext ) fragment.addBitmap( - BitmapUtils.createAvatarWithStatus(paulette, StatusType.dnd, "", targetContext), + BitmapUtils.createAvatarWithStatus(paulette, StatusType.Dnd, "", targetContext), width * 2, 1, targetContext ) fragment.addBitmap( - BitmapUtils.createAvatarWithStatus(christine, StatusType.away, "", targetContext), + BitmapUtils.createAvatarWithStatus(christine, StatusType.Away, "", targetContext), width * 2, 1, targetContext ) fragment.addBitmap( - BitmapUtils.createAvatarWithStatus(paulette, StatusType.offline, "", targetContext), + BitmapUtils.createAvatarWithStatus(paulette, StatusType.Offline, "", targetContext), width * 2, 1, targetContext ) fragment.addBitmap( - BitmapUtils.createAvatarWithStatus(textBitmap, StatusType.online, "😘", targetContext), + BitmapUtils.createAvatarWithStatus(textBitmap, StatusType.Online, "😘", targetContext), width, 2, targetContext ) fragment.addBitmap( - BitmapUtils.createAvatarWithStatus(textBitmap, StatusType.online, "☁️", targetContext), + BitmapUtils.createAvatarWithStatus(textBitmap, StatusType.Online, "☁️", targetContext), width, 2, targetContext ) fragment.addBitmap( - BitmapUtils.createAvatarWithStatus(textBitmap, StatusType.online, "🌴️", targetContext), + BitmapUtils.createAvatarWithStatus(textBitmap, StatusType.Online, "🌴️", targetContext), width, 2, targetContext ) fragment.addBitmap( - BitmapUtils.createAvatarWithStatus(textBitmap, StatusType.online, "", targetContext), + BitmapUtils.createAvatarWithStatus(textBitmap, StatusType.Online, "", targetContext), width, 2, targetContext ) fragment.addBitmap( - BitmapUtils.createAvatarWithStatus(textBitmap, StatusType.dnd, "", targetContext), + BitmapUtils.createAvatarWithStatus(textBitmap, StatusType.Dnd, "", targetContext), width, 2, targetContext ) fragment.addBitmap( - BitmapUtils.createAvatarWithStatus(textBitmap, StatusType.away, "", targetContext), + BitmapUtils.createAvatarWithStatus(textBitmap, StatusType.Away, "", targetContext), width, 2, targetContext ) fragment.addBitmap( - BitmapUtils.createAvatarWithStatus(textBitmap, StatusType.offline, "", targetContext), + BitmapUtils.createAvatarWithStatus(textBitmap, StatusType.Offline, "", targetContext), width, 2, targetContext diff --git a/src/main/java/com/nextcloud/client/account/StatusType.kt b/src/main/java/com/nextcloud/client/account/StatusType.kt index 15873ee0cd..986069a73c 100644 --- a/src/main/java/com/nextcloud/client/account/StatusType.kt +++ b/src/main/java/com/nextcloud/client/account/StatusType.kt @@ -23,5 +23,5 @@ package com.nextcloud.client.account enum class StatusType { - online, offline, dnd, away, unknown + Online, Offline, Dnd, Away, Unknown } diff --git a/src/main/java/com/owncloud/android/providers/UsersAndGroupsSearchProvider.java b/src/main/java/com/owncloud/android/providers/UsersAndGroupsSearchProvider.java index 27f108d386..fb2c2ceec9 100644 --- a/src/main/java/com/owncloud/android/providers/UsersAndGroupsSearchProvider.java +++ b/src/main/java/com/owncloud/android/providers/UsersAndGroupsSearchProvider.java @@ -266,7 +266,7 @@ public class UsersAndGroupsSearchProvider extends ContentProvider { statusObject.isNull("icon") ? "" : statusObject.getString("icon"), statusObject.isNull("clearAt") ? "" : statusObject.getString("clearAt")); } else { - status = new Status(StatusType.unknown, "", "", ""); + status = new Status(StatusType.Unknown, "", "", ""); } switch (type) { diff --git a/src/main/java/com/owncloud/android/utils/BitmapUtils.java b/src/main/java/com/owncloud/android/utils/BitmapUtils.java index 5b5a60f6de..cdaa21192f 100644 --- a/src/main/java/com/owncloud/android/utils/BitmapUtils.java +++ b/src/main/java/com/owncloud/android/utils/BitmapUtils.java @@ -432,7 +432,7 @@ public final class BitmapUtils { StatusDrawable statusDrawable; if (TextUtils.isEmpty(icon)) { switch (status) { - case dnd: + case Dnd: statusDrawable = new StatusDrawable(R.drawable.ic_user_status_dnd, statusSize, context); statusDrawable.setBounds(width / 2, width / 2, @@ -440,7 +440,7 @@ public final class BitmapUtils { width); break; - case online: + case Online: statusDrawable = new StatusDrawable(new Color(255, 73, 179, 130), statusSize); statusDrawable.setBounds(width, width, @@ -448,7 +448,7 @@ public final class BitmapUtils { width); break; - case away: + case Away: statusDrawable = new StatusDrawable(R.drawable.ic_user_status_away, statusSize, context); statusDrawable.setBounds(width / 2, width / 2,