From fea7820740682b078beab4fb4004e6c5647d8360 Mon Sep 17 00:00:00 2001 From: M57 Date: Sun, 21 Jun 2026 17:18:59 +0300 Subject: [PATCH] fix: extract long toast string to val, fix indentation --- .../m57/hermescontrol/notification/ChatNotificationService.kt | 2 +- .../com/m57/hermescontrol/ui/channels/ChannelsViewModel.kt | 3 ++- 2 files changed, 3 insertions(+), 2 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 f76723d4..77f1aa7e 100644 --- a/app/src/main/java/com/m57/hermescontrol/notification/ChatNotificationService.kt +++ b/app/src/main/java/com/m57/hermescontrol/notification/ChatNotificationService.kt @@ -159,7 +159,7 @@ class ChatNotificationService : Service() { if (!sessionId.isNullOrBlank()) { putExtra(NotificationReplyReceiver.EXTRA_SESSION_ID, sessionId) } - } + } return PendingIntent.getActivity( this, sessionId?.hashCode() ?: 0, 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 25884f13..020fceae 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,10 +62,11 @@ class ChannelsViewModel : ViewModel() { } when (result) { is NetworkResult.Success -> { + val message = "$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", + toastMessage = message, ) } loadPlatforms()