From 3c3ed3a044e588f7fbf434315d74122070f6cd8b Mon Sep 17 00:00:00 2001 From: Maksim Zoteev <39910552+F0x1d@users.noreply.github.com> Date: Wed, 27 Nov 2024 15:27:28 +0300 Subject: [PATCH] [feat]: update v2.0.6 * [fix]: content contains field in filters and battery consumption * [build]: bumped app version --- app/build.gradle.kts | 4 ++-- .../filters/edit/presentation/ui/EditFilterFragment.kt | 2 +- .../feature/logging/impl/data/LoggingRepositoryImpl.kt | 6 +++--- .../feature/logging/service/presentation/LoggingService.kt | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 9ecab53f..7ee24c94 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -9,8 +9,8 @@ android { defaultConfig { applicationId = logFoxPackageName - versionCode = 65 - versionName = "2.0.5" + versionCode = 66 + versionName = "2.0.6" } } diff --git a/feature/filters/edit/src/main/kotlin/com/f0x1d/logfox/feature/filters/edit/presentation/ui/EditFilterFragment.kt b/feature/filters/edit/src/main/kotlin/com/f0x1d/logfox/feature/filters/edit/presentation/ui/EditFilterFragment.kt index 3434d8ad..a3148a52 100644 --- a/feature/filters/edit/src/main/kotlin/com/f0x1d/logfox/feature/filters/edit/presentation/ui/EditFilterFragment.kt +++ b/feature/filters/edit/src/main/kotlin/com/f0x1d/logfox/feature/filters/edit/presentation/ui/EditFilterFragment.kt @@ -92,7 +92,7 @@ class EditFilterFragment : BaseFragment() { tidText.doAfterTextChanged { viewModel.tid = it?.toString().orEmpty() } packageNameText.doAfterTextChanged { viewModel.packageName = it?.toString().orEmpty() } tagText.doAfterTextChanged { viewModel.tag = it?.toString().orEmpty() } - contentText.doAfterTextChanged { viewModel.tag = it?.toString().orEmpty() } + contentText.doAfterTextChanged { viewModel.content = it?.toString().orEmpty() } viewModel.state.collectWithLifecycle { state -> updateIncludingButton(state.including) diff --git a/feature/logging/impl/src/main/kotlin/com/f0x1d/logfox/feature/logging/impl/data/LoggingRepositoryImpl.kt b/feature/logging/impl/src/main/kotlin/com/f0x1d/logfox/feature/logging/impl/data/LoggingRepositoryImpl.kt index bf43ba11..cdc683b9 100644 --- a/feature/logging/impl/src/main/kotlin/com/f0x1d/logfox/feature/logging/impl/data/LoggingRepositoryImpl.kt +++ b/feature/logging/impl/src/main/kotlin/com/f0x1d/logfox/feature/logging/impl/data/LoggingRepositoryImpl.kt @@ -9,13 +9,13 @@ import com.f0x1d.logfox.preferences.shared.AppPreferences import com.f0x1d.logfox.terminals.base.Terminal import dagger.hilt.android.qualifiers.ApplicationContext import kotlinx.coroutines.CoroutineDispatcher +import kotlinx.coroutines.delay import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.FlowCollector import kotlinx.coroutines.flow.flow import kotlinx.coroutines.flow.flowOn import kotlinx.coroutines.withContext import kotlinx.coroutines.withTimeout -import kotlinx.coroutines.yield import timber.log.Timber import java.io.BufferedReader import javax.inject.Inject @@ -110,11 +110,11 @@ internal class LoggingRepositoryImpl @Inject constructor( private suspend fun BufferedReader.readLineCancellable(): String = withContext(ioDispatcher) { while (true) { - yield() - if (ready()) { return@withContext readLine() } + + delay(100L) } "not reachable" diff --git a/feature/logging/service/src/main/kotlin/com/f0x1d/logfox/feature/logging/service/presentation/LoggingService.kt b/feature/logging/service/src/main/kotlin/com/f0x1d/logfox/feature/logging/service/presentation/LoggingService.kt index f30bef78..4111cb7f 100644 --- a/feature/logging/service/src/main/kotlin/com/f0x1d/logfox/feature/logging/service/presentation/LoggingService.kt +++ b/feature/logging/service/src/main/kotlin/com/f0x1d/logfox/feature/logging/service/presentation/LoggingService.kt @@ -150,7 +150,7 @@ class LoggingService : LifecycleService() { terminal = loggingTerminal, startingId = logs.lastOrNull()?.id ?: 0, ).catch { throwable -> - Timber.e(throwable) + Timber.e("logging flow threw smth", throwable) if (throwable is TerminalNotSupportedException) { if (appPreferences.fallbackToDefaultTerminal) {