diff --git a/CHANGELOG.md b/CHANGELOG.md index 03a91441a92..bf02d500793 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ ([#960](https://github.com/Automattic/pocket-casts-android/pull/960)). * Fixed crash on grouping by season ([#962](https://github.com/Automattic/pocket-casts-android/pull/962)). + * Fixed bug that prevented full logs from being displayed within the app + ([#974](https://github.com/Automattic/pocket-casts-android/pull/974)). * Updates * Link users to support forum from within the app ([#950](https://github.com/Automattic/pocket-casts-android/pull/950)). diff --git a/modules/features/settings/src/main/java/au/com/shiftyjelly/pocketcasts/settings/viewmodel/LogsViewModel.kt b/modules/features/settings/src/main/java/au/com/shiftyjelly/pocketcasts/settings/viewmodel/LogsViewModel.kt index 4f33700ddcb..75e1bbe58ab 100644 --- a/modules/features/settings/src/main/java/au/com/shiftyjelly/pocketcasts/settings/viewmodel/LogsViewModel.kt +++ b/modules/features/settings/src/main/java/au/com/shiftyjelly/pocketcasts/settings/viewmodel/LogsViewModel.kt @@ -4,12 +4,14 @@ import android.content.Context import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope import au.com.shiftyjelly.pocketcasts.repositories.support.Support +import au.com.shiftyjelly.pocketcasts.utils.log.LogBuffer import dagger.hilt.android.lifecycle.HiltViewModel import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.asStateFlow import kotlinx.coroutines.flow.update import kotlinx.coroutines.launch +import java.io.ByteArrayOutputStream import javax.inject.Inject import au.com.shiftyjelly.pocketcasts.localization.R as LR @@ -27,7 +29,12 @@ class LogsViewModel @Inject constructor( init { viewModelScope.launch(Dispatchers.IO) { - val logs = support.getUserDebug(false) + val logs = buildString { + append(support.getUserDebug(false)) + val outputStream = ByteArrayOutputStream() + LogBuffer.output(outputStream) + append(outputStream.toString()) + } _state.update { it.copy(logs = logs) } } }