diff options
5 files changed, 18 insertions, 17 deletions
diff --git a/app/src/main/java/com/nextcloud/talk/controllers/ContactsController.java b/app/src/main/java/com/nextcloud/talk/controllers/ContactsController.java index 0537a8ffe..fc9d2d8ce 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/ContactsController.java +++ b/app/src/main/java/com/nextcloud/talk/controllers/ContactsController.java @@ -62,7 +62,6 @@ import com.nextcloud.talk.models.json.autocomplete.AutocompleteUser; import com.nextcloud.talk.models.json.conversations.Conversation; import com.nextcloud.talk.models.json.conversations.RoomOverall; import com.nextcloud.talk.models.json.converters.EnumActorTypeConverter; -import com.nextcloud.talk.models.json.converters.EnumParticipantTypeConverter; import com.nextcloud.talk.models.json.participants.Participant; import com.nextcloud.talk.utils.ApiUtils; import com.nextcloud.talk.utils.ConductorRemapping; diff --git a/app/src/main/java/com/nextcloud/talk/controllers/ConversationInfoController.kt b/app/src/main/java/com/nextcloud/talk/controllers/ConversationInfoController.kt index a73fb367d..6dee8e4ae 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/ConversationInfoController.kt +++ b/app/src/main/java/com/nextcloud/talk/controllers/ConversationInfoController.kt @@ -715,7 +715,8 @@ class ConversationInfoController(args: Bundle) : BaseController(args), FlexibleA } if (participant.type == Participant.ParticipantType.MODERATOR || - participant.type == Participant.ParticipantType.GUEST_MODERATOR) { + participant.type == Participant.ParticipantType.GUEST_MODERATOR + ) { ncApi.demoteAttendeeFromModerator( credentials, ApiUtils.getUrlForRoomModerators( @@ -729,7 +730,8 @@ class ConversationInfoController(args: Bundle) : BaseController(args), FlexibleA .observeOn(AndroidSchedulers.mainThread()) .subscribe(subscriber) } else if (participant.type == Participant.ParticipantType.USER || - participant.type == Participant.ParticipantType.GUEST) { + participant.type == Participant.ParticipantType.GUEST + ) { ncApi.promoteAttendeeToModerator( credentials, ApiUtils.getUrlForRoomModerators( diff --git a/app/src/main/java/com/nextcloud/talk/controllers/bottomsheet/OperationsMenuController.java b/app/src/main/java/com/nextcloud/talk/controllers/bottomsheet/OperationsMenuController.java index 3cea909e9..69811b8d9 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/bottomsheet/OperationsMenuController.java +++ b/app/src/main/java/com/nextcloud/talk/controllers/bottomsheet/OperationsMenuController.java @@ -54,7 +54,6 @@ import com.nextcloud.talk.models.json.capabilities.Capabilities; import com.nextcloud.talk.models.json.capabilities.CapabilitiesOverall; import com.nextcloud.talk.models.json.conversations.Conversation; import com.nextcloud.talk.models.json.conversations.RoomOverall; -import com.nextcloud.talk.models.json.generic.GenericOverall; import com.nextcloud.talk.models.json.participants.AddParticipantOverall; import com.nextcloud.talk.utils.ApiUtils; import com.nextcloud.talk.utils.ConductorRemapping; diff --git a/app/src/main/java/com/nextcloud/talk/models/json/converters/EnumActorTypeConverter.kt b/app/src/main/java/com/nextcloud/talk/models/json/converters/EnumActorTypeConverter.kt index 22fcf6c21..ca7407a36 100644 --- a/app/src/main/java/com/nextcloud/talk/models/json/converters/EnumActorTypeConverter.kt +++ b/app/src/main/java/com/nextcloud/talk/models/json/converters/EnumActorTypeConverter.kt @@ -2,7 +2,9 @@ * Nextcloud Talk application * * @author Joas Schilling + * @author Andy Scherzinger * Copyright (C) 2021 Joas Schilling <coding@schilljs.com> + * Copyright (C) 2021 Andy Scherzinger <info@andy-scherzinger.de> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -30,12 +32,12 @@ import com.nextcloud.talk.models.json.participants.Participant.ActorType.USERS class EnumActorTypeConverter : StringBasedTypeConverter<Participant.ActorType>() { override fun getFromString(string: String): Participant.ActorType { - when (string) { - "emails" -> return EMAILS - "groups" -> return GROUPS - "guests" -> return GUESTS - "users" -> return USERS - else -> return DUMMY + return when (string) { + "emails" -> EMAILS + "groups" -> GROUPS + "guests" -> GUESTS + "users" -> USERS + else -> DUMMY } } @@ -45,12 +47,12 @@ class EnumActorTypeConverter : StringBasedTypeConverter<Participant.ActorType>() return "" } - when (`object`) { - EMAILS -> return "emails" - GROUPS -> return "groups" - GUESTS -> return "guests" - USERS -> return "users" - else -> return "" + return when (`object`) { + EMAILS -> "emails" + GROUPS -> "groups" + GUESTS -> "guests" + USERS -> "users" + else -> "" } } } diff --git a/app/src/main/java/com/nextcloud/talk/models/json/participants/Participant.java b/app/src/main/java/com/nextcloud/talk/models/json/participants/Participant.java index 587e33810..71a9db829 100644 --- a/app/src/main/java/com/nextcloud/talk/models/json/participants/Participant.java +++ b/app/src/main/java/com/nextcloud/talk/models/json/participants/Participant.java @@ -24,7 +24,6 @@ import com.bluelinelabs.logansquare.annotation.JsonField; import com.bluelinelabs.logansquare.annotation.JsonObject; import com.nextcloud.talk.models.json.converters.EnumActorTypeConverter; import com.nextcloud.talk.models.json.converters.EnumParticipantTypeConverter; -import com.nextcloud.talk.models.json.converters.EnumSystemMessageTypeConverter; import com.nextcloud.talk.models.json.converters.ObjectParcelConverter; import org.parceler.Parcel; |