From ab92b31d2e63d15d79cc2612f6d4833a37f2a6f9 Mon Sep 17 00:00:00 2001 From: M57 Date: Sun, 21 Jun 2026 17:16:05 +0300 Subject: [PATCH] fix: ktlint wrapping violations on toast message and intent builder --- .../notification/ChatNotificationService.kt | 11 ++++++----- .../hermescontrol/ui/channels/ChannelsViewModel.kt | 7 ++++++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/com/m57/hermescontrol/notification/ChatNotificationService.kt b/app/src/main/java/com/m57/hermescontrol/notification/ChatNotificationService.kt index d0092110..f76723d4 100644 --- a/app/src/main/java/com/m57/hermescontrol/notification/ChatNotificationService.kt +++ b/app/src/main/java/com/m57/hermescontrol/notification/ChatNotificationService.kt @@ -153,11 +153,12 @@ class ChatNotificationService : Service() { } private fun buildContentIntent(sessionId: String?): PendingIntent { - val intent = Intent(this, MainActivity::class.java).apply { - flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP - if (!sessionId.isNullOrBlank()) { - putExtra(NotificationReplyReceiver.EXTRA_SESSION_ID, sessionId) - } + val intent = Intent(this, MainActivity::class.java) + .apply { + flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP + if (!sessionId.isNullOrBlank()) { + putExtra(NotificationReplyReceiver.EXTRA_SESSION_ID, sessionId) + } } return PendingIntent.getActivity( this, diff --git a/app/src/main/java/com/m57/hermescontrol/ui/channels/ChannelsViewModel.kt b/app/src/main/java/com/m57/hermescontrol/ui/channels/ChannelsViewModel.kt index 762cf733..25884f13 100644 --- a/app/src/main/java/com/m57/hermescontrol/ui/channels/ChannelsViewModel.kt +++ b/app/src/main/java/com/m57/hermescontrol/ui/channels/ChannelsViewModel.kt @@ -62,7 +62,12 @@ class ChannelsViewModel : ViewModel() { } when (result) { is NetworkResult.Success -> { - _uiState.update { it.copy(isLoading = false, toastMessage = "$platformId configured successfully — restart the gateway for changes to take effect") } + _uiState.update { + it.copy( + isLoading = false, + toastMessage = "$platformId configured successfully — restart the gateway for changes to take effect", + ) + } loadPlatforms() }