From 27b544cdbb17ee5cae78510716fb9fd35a225400 Mon Sep 17 00:00:00 2001 From: Gideon Okuro Date: Wed, 4 Dec 2024 00:34:38 +0300 Subject: [PATCH] bluetooth: smoother initialization (fixes #2054) (#2157) Co-authored-by: dogi --- .../main/kotlin/io/treehouses/remote/BaseInitialActivity.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/kotlin/io/treehouses/remote/BaseInitialActivity.kt b/app/src/main/kotlin/io/treehouses/remote/BaseInitialActivity.kt index 397e0a2c9..7e2d5cb4f 100644 --- a/app/src/main/kotlin/io/treehouses/remote/BaseInitialActivity.kt +++ b/app/src/main/kotlin/io/treehouses/remote/BaseInitialActivity.kt @@ -51,6 +51,9 @@ open class BaseInitialActivity: PermissionActivity(), NavigationView.OnNavigatio } override fun getChatService(): BluetoothChatService { + if (!this::mChatService.isInitialized) { + mChatService = BluetoothChatService() + } return mChatService }