Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4289,8 +4289,13 @@
*
* @param userId The ID of the user to un-flag.
*/
@Deprecated(
message = "The backend no longer supports un-flagging. This call does nothing and will be removed " +
"in the next major version.",
level = DeprecationLevel.WARNING,
)
@CheckResult
public fun unflagUser(userId: String): Call<Flag> = api.unflagUser(userId)

Check warning on line 4298 in stream-chat-android-client/src/main/java/io/getstream/chat/android/client/ChatClient.kt

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Do not forget to remove this deprecated code someday.

See more on https://sonarcloud.io/project/issues?id=GetStream_stream-chat-android&issues=AaA5pRRfhKBcFfompDj4&open=AaA5pRRfhKBcFfompDj4&pullRequest=6661

/**
* Flags a message.
Expand All @@ -4315,8 +4320,13 @@
*
* @param messageId The ID of the message to un-flag.
*/
@Deprecated(
message = "The backend no longer supports un-flagging. This call does nothing and will be removed " +
"in the next major version.",
level = DeprecationLevel.WARNING,
)
@CheckResult
public fun unflagMessage(messageId: String): Call<Flag> = api.unflagMessage(messageId)

Check warning on line 4329 in stream-chat-android-client/src/main/java/io/getstream/chat/android/client/ChatClient.kt

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Do not forget to remove this deprecated code someday.

See more on https://sonarcloud.io/project/issues?id=GetStream_stream-chat-android&issues=AaA5pRRfhKBcFfompDj5&open=AaA5pRRfhKBcFfompDj5&pullRequest=6661

/**
* Translate a message.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ import org.mockito.kotlin.whenever
/**
* Tests for the moderation functionalities of the [ChatClient].
*/
@Suppress("DEPRECATION")
internal class ChatClientModerationApiTests : BaseChatClientTest() {

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,13 @@
*
* @param userId The ID of the user to un-flag.
*/
@Deprecated(
message = "The backend no longer supports un-flagging. This call does nothing and will be removed " +
"in the next major version.",
level = DeprecationLevel.WARNING,
)
@Suppress("DEPRECATION")
public fun unflagUser(userId: String) {

Check warning on line 419 in stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/viewmodel/messages/MessageListViewModel.kt

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Do not forget to remove this deprecated code someday.

See more on https://sonarcloud.io/project/issues?id=GetStream_stream-chat-android&issues=AaA5pRXfhKBcFfompDj6&open=AaA5pRXfhKBcFfompDj6&pullRequest=6661
messageListController.unflagUser(userId)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2246,7 +2246,13 @@
*
* @param userId The ID of the user to un-flag.
*/
@Deprecated(
message = "The backend no longer supports un-flagging. This call does nothing and will be removed " +
"in the next major version.",
level = DeprecationLevel.WARNING,
)
@Suppress("DEPRECATION")
public fun unflagUser(userId: String) {

Check warning on line 2255 in stream-chat-android-ui-common/src/main/kotlin/io/getstream/chat/android/ui/common/feature/messages/list/MessageListController.kt

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Do not forget to remove this deprecated code someday.

See more on https://sonarcloud.io/project/issues?id=GetStream_stream-chat-android&issues=AaA5pRZGhKBcFfompDj7&open=AaA5pRZGhKBcFfompDj7&pullRequest=6661
chatClient
.unflagUser(userId = userId)
.enqueue(onError = { error ->
Expand Down Expand Up @@ -2610,7 +2616,12 @@
*
* @param streamError Contains the original [Throwable] along with a message.
*/
@Deprecated(
message = "The backend no longer supports un-flagging. This call does nothing and will be removed " +
"in the next major version.",
level = DeprecationLevel.WARNING,
)
public data class UnflagUserError(override val streamError: Error) : ErrorEvent(streamError)

Check warning on line 2624 in stream-chat-android-ui-common/src/main/kotlin/io/getstream/chat/android/ui/common/feature/messages/list/MessageListController.kt

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Do not forget to remove this deprecated code someday.

See more on https://sonarcloud.io/project/issues?id=GetStream_stream-chat-android&issues=AaA5pRZGhKBcFfompDj8&open=AaA5pRZGhKBcFfompDj8&pullRequest=6661

/**
* When an error occurs while pinning a message.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ public class MessageListView : ConstraintLayout {
}
}

@Suppress("DEPRECATION")
private var errorEventHandler = ErrorEventHandler { error ->
when (error) {
is MessageListController.ErrorEvent.MuteUserError -> R.string.stream_ui_message_list_error_mute_user
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ public class MessageListViewModel(
/**
* Handles an [Event] coming from the View layer.
*/
@Suppress("LongMethod", "ComplexMethod")
@Suppress("LongMethod", "ComplexMethod", "DEPRECATION")
public fun onEvent(event: Event) {
logger.v { "[onEvent] event: $event" }
when (event) {
Expand Down Expand Up @@ -735,6 +735,11 @@ public class MessageListViewModel(
*
* @param userId The ID of the user to un-flag.
*/
@Deprecated(
message = "The backend no longer supports un-flagging. This call does nothing and will be removed " +
"in the next major version.",
level = DeprecationLevel.WARNING,
)
public data class UnflagUser(val userId: String) : Event()

/**
Expand Down
Loading