From 0146a2975f7c85eb37aeed64fc8ead2a6b41f3ce Mon Sep 17 00:00:00 2001 From: Al Lansley Date: Thu, 4 Apr 2024 13:36:14 +1100 Subject: [PATCH] Cleanup --- .../securesms/home/search/GlobalSearchInputLayout.kt | 1 - .../securesms/home/search/GlobalSearchViewModel.kt | 8 +------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/home/search/GlobalSearchInputLayout.kt b/app/src/main/java/org/thoughtcrime/securesms/home/search/GlobalSearchInputLayout.kt index c70979f852..c22ccde1f1 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/home/search/GlobalSearchInputLayout.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/home/search/GlobalSearchInputLayout.kt @@ -17,7 +17,6 @@ import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.StateFlow import network.loki.messenger.databinding.ViewGlobalSearchInputBinding - class GlobalSearchInputLayout @JvmOverloads constructor( context: Context, attrs: AttributeSet? = null ) : LinearLayout(context, attrs), diff --git a/app/src/main/java/org/thoughtcrime/securesms/home/search/GlobalSearchViewModel.kt b/app/src/main/java/org/thoughtcrime/securesms/home/search/GlobalSearchViewModel.kt index 4232754c4e..1ff0a395fe 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/home/search/GlobalSearchViewModel.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/home/search/GlobalSearchViewModel.kt @@ -2,9 +2,7 @@ package org.thoughtcrime.securesms.home.search import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope - import dagger.hilt.android.lifecycle.HiltViewModel - import kotlinx.coroutines.SupervisorJob import kotlinx.coroutines.channels.BufferOverflow import kotlinx.coroutines.delay @@ -15,14 +13,10 @@ import kotlinx.coroutines.flow.launchIn import kotlinx.coroutines.flow.mapLatest import kotlinx.coroutines.flow.onEach import kotlinx.coroutines.plus - import org.session.libsignal.utilities.SettableFuture - import org.thoughtcrime.securesms.search.SearchRepository import org.thoughtcrime.securesms.search.model.SearchResult - import java.util.concurrent.TimeUnit - import javax.inject.Inject @HiltViewModel @@ -51,7 +45,7 @@ class GlobalSearchViewModel @Inject constructor(private val searchRepository: Se SearchResult.EMPTY } else { // User input delay in case we get a new query within a few hundred ms this - // coroutine will be cancelled and expensive query will not be run + // coroutine will be cancelled and the expensive query will not be run. delay(300) val settableFuture = SettableFuture()