mirror of
https://github.com/d4rken-org/capod.git
synced 2026-09-14 18:26:11 -04:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3b48d61571 | ||
|
|
92d5e2a40d | ||
|
|
234857c414 | ||
|
|
b1bbe785ea |
@@ -90,7 +90,7 @@ class RecorderModule @Inject constructor(
|
|||||||
|
|
||||||
private fun createRecordingFilePath() = File(
|
private fun createRecordingFilePath() = File(
|
||||||
File(context.cacheDir, "debug/logs"),
|
File(context.cacheDir, "debug/logs"),
|
||||||
"bb_logfile_${System.currentTimeMillis()}.log"
|
"capod_logfile_${System.currentTimeMillis()}.log"
|
||||||
)
|
)
|
||||||
|
|
||||||
suspend fun startRecorder(): File {
|
suspend fun startRecorder(): File {
|
||||||
@@ -123,6 +123,6 @@ class RecorderModule @Inject constructor(
|
|||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
internal val TAG = logTag("Debug", "Log", "Recorder", "Module")
|
internal val TAG = logTag("Debug", "Log", "Recorder", "Module")
|
||||||
private const val FORCE_FILE = "bb_force_debug_run"
|
private const val FORCE_FILE = "capod_force_debug_run"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+1
@@ -34,6 +34,7 @@ class DebugSettingsFragment : PreferenceFragment2() {
|
|||||||
vm.toggleRecorder()
|
vm.toggleRecorder()
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+19
@@ -3,10 +3,15 @@ package eu.darken.capod.main.ui.settings.general.debug
|
|||||||
import androidx.lifecycle.SavedStateHandle
|
import androidx.lifecycle.SavedStateHandle
|
||||||
import dagger.hilt.android.lifecycle.HiltViewModel
|
import dagger.hilt.android.lifecycle.HiltViewModel
|
||||||
import eu.darken.capod.common.coroutine.DispatcherProvider
|
import eu.darken.capod.common.coroutine.DispatcherProvider
|
||||||
|
import eu.darken.capod.common.debug.autoreport.DebugSettings
|
||||||
|
import eu.darken.capod.common.debug.logging.log
|
||||||
import eu.darken.capod.common.debug.logging.logTag
|
import eu.darken.capod.common.debug.logging.logTag
|
||||||
import eu.darken.capod.common.debug.recording.core.RecorderModule
|
import eu.darken.capod.common.debug.recording.core.RecorderModule
|
||||||
import eu.darken.capod.common.uix.ViewModel3
|
import eu.darken.capod.common.uix.ViewModel3
|
||||||
|
import eu.darken.capod.main.core.GeneralSettings
|
||||||
|
import kotlinx.coroutines.flow.distinctUntilChanged
|
||||||
import kotlinx.coroutines.flow.first
|
import kotlinx.coroutines.flow.first
|
||||||
|
import kotlinx.coroutines.flow.onEach
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
@HiltViewModel
|
@HiltViewModel
|
||||||
@@ -14,10 +19,24 @@ class DebugSettingsFragmentVM @Inject constructor(
|
|||||||
private val handle: SavedStateHandle,
|
private val handle: SavedStateHandle,
|
||||||
dispatcherProvider: DispatcherProvider,
|
dispatcherProvider: DispatcherProvider,
|
||||||
private val recorderModule: RecorderModule,
|
private val recorderModule: RecorderModule,
|
||||||
|
private val generalSettings: GeneralSettings,
|
||||||
|
private val debugSettings: DebugSettings,
|
||||||
) : ViewModel3(dispatcherProvider) {
|
) : ViewModel3(dispatcherProvider) {
|
||||||
|
|
||||||
val state = recorderModule.state.asLiveData2()
|
val state = recorderModule.state.asLiveData2()
|
||||||
|
|
||||||
|
init {
|
||||||
|
debugSettings.showUnfiltered.flow
|
||||||
|
.distinctUntilChanged()
|
||||||
|
.onEach { showUnfiltered ->
|
||||||
|
if (showUnfiltered) {
|
||||||
|
log(TAG) { "Enabling 'show all' due to debug setting 'show unfiltered' enabled" }
|
||||||
|
generalSettings.showAll.value = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.launchInViewModel()
|
||||||
|
}
|
||||||
|
|
||||||
fun toggleRecorder() = launch {
|
fun toggleRecorder() = launch {
|
||||||
if (recorderModule.state.first().isRecording) {
|
if (recorderModule.state.first().isRecording) {
|
||||||
recorderModule.stopRecorder()
|
recorderModule.stopRecorder()
|
||||||
|
|||||||
@@ -135,5 +135,5 @@
|
|||||||
<string name="settings_compatibility_mode_label">Kompatibilitätsmodus</string>
|
<string name="settings_compatibility_mode_label">Kompatibilitätsmodus</string>
|
||||||
<string name="settings_compatibility_mode_description">Deaktivieren Sie Optimierungen, um die Kompatibilität zu verbessern. Versuchen Sie dies, wenn Sie keine Daten sehen.</string>
|
<string name="settings_compatibility_mode_description">Deaktivieren Sie Optimierungen, um die Kompatibilität zu verbessern. Versuchen Sie dies, wenn Sie keine Daten sehen.</string>
|
||||||
<string name="translators_thanks_title">Übersetzer</string>
|
<string name="translators_thanks_title">Übersetzer</string>
|
||||||
<string name="translators_thanks_description" comment="translators_thanks_description You can voluntarily add your name here to have it displayed in the app. It will be shown in the Settings>Acknowledgements>Thank you section. Separate names by semicolons and an optional email may be included in brackets, example: darken(darken@darken.eu);John Doe(john@example.com) "darken" is just a placeholder and does not have to be kept if/when you add yours. Be nice to each other!">darken</string>
|
<string name="translators_thanks_description" comment="translators_thanks_description You can voluntarily add your name here to have it displayed in the app. It will be shown in the Settings>Acknowledgements>Thank you section. Separate names by semicolons and an optional email may be included in brackets, example: darken(darken@darken.eu);John Doe(john@example.com) "darken" is just a placeholder and does not have to be kept if/when you add yours. Be nice to each other!">Gamechanger181</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -134,4 +134,14 @@
|
|||||||
<string name="permission_required_title">Izin berikut diperlukan:</string>
|
<string name="permission_required_title">Izin berikut diperlukan:</string>
|
||||||
<string name="settings_compatibility_mode_label">Mode kompatibilitas</string>
|
<string name="settings_compatibility_mode_label">Mode kompatibilitas</string>
|
||||||
<string name="settings_compatibility_mode_description">Nonaktifkan pengoptimalan untuk meningkatkan kompatibilitas. Coba ini jika anda tidak melihat data apa pun.</string>
|
<string name="settings_compatibility_mode_description">Nonaktifkan pengoptimalan untuk meningkatkan kompatibilitas. Coba ini jika anda tidak melihat data apa pun.</string>
|
||||||
|
<string name="translators_thanks_title">Penerjemah</string>
|
||||||
|
<string name="translators_thanks_description" comment="translators_thanks_description You can voluntarily add your name here to have it displayed in the app. It will be shown in the Settings>Acknowledgements>Thank you section. Separate names by semicolons and an optional email may be included in brackets, example: darken(darken@darken.eu);John Doe(john@example.com) "darken" is just a placeholder and does not have to be kept if/when you add yours. Be nice to each other!">nama anda dapat ditambahkan sebagai relawan di sini dan ditampilkan di aplikasi. Itu akan ditampilkan pada bagian Pengaturan>Penghargaan>Terima kasih
|
||||||
|
|
||||||
|
Pisahkan nama dengan titik koma dan email opsional dapat dimasukkan dalam tanda kurung, contoh:
|
||||||
|
|
||||||
|
𝓼𝓾𝓵𝓽𝓪𝓷 𝓱𝓪𝓶𝓴𝓪(sultanhamka@gmail.com); John Doe(john@example.com)
|
||||||
|
|
||||||
|
\"𝓼𝓾𝓵𝓽𝓪𝓷 𝓱𝓪𝓶𝓴𝓪\" hanyalah pengganti dan tidak harus disimpan jika/ketika anda menambahkan milik anda.
|
||||||
|
|
||||||
|
Bersikap baik satu sama lain!</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@ buildscript {
|
|||||||
'version' : [
|
'version' : [
|
||||||
'major': 1,
|
'major': 1,
|
||||||
'minor': 3,
|
'minor': 3,
|
||||||
'patch': 10,
|
'patch': 11,
|
||||||
'build': 0,
|
'build': 0,
|
||||||
],
|
],
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user