proper kotlin enum naming pattern

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
Andy Scherzinger 2020-10-21 23:00:16 +02:00
parent 4d5eb127f8
commit 96680fdeca
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B
4 changed files with 19 additions and 19 deletions

View file

@ -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

View file

@ -23,5 +23,5 @@
package com.nextcloud.client.account
enum class StatusType {
online, offline, dnd, away, unknown
Online, Offline, Dnd, Away, Unknown
}

View file

@ -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) {

View file

@ -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,