Skip to content

Commit 3ba2ded

Browse files
committed
refactor(apps:mobile): Replace Timber with standard Android Log
- Removed Timber dependency and initialization from MoccaApp - Updated MainContent to use android.util.Log for debug messages - Simplified application class by removing setupTimber
1 parent 61a4808 commit 3ba2ded

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

apps/mobile/src/main/kotlin/dev/marlonlom/mocca/MoccaApp.kt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import org.koin.android.ext.koin.androidContext
1010
import org.koin.android.ext.koin.androidLogger
1111
import org.koin.core.context.startKoin
1212
import org.koin.core.logger.Level
13-
import timber.log.Timber
1413

1514
/**
1615
* Mocca application class.
@@ -23,7 +22,6 @@ class MoccaApp : Application() {
2322
override fun onCreate() {
2423
super.onCreate()
2524
this.setupKoin()
26-
setupTimber()
2725
}
2826

2927
/** Setup Koin module context feature. */
@@ -35,10 +33,4 @@ class MoccaApp : Application() {
3533
}
3634
}
3735

38-
/** Setup timber logging feature. */
39-
private fun setupTimber() {
40-
if (BuildConfig.DEBUG) {
41-
Timber.plant(Timber.DebugTree())
42-
}
43-
}
4436
}

apps/mobile/src/main/kotlin/dev/marlonlom/mocca/ui/main/MainContent.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
package dev.marlonlom.mocca.ui.main
66

77
import android.content.Intent
8+
import android.util.Log
89
import androidx.compose.foundation.background
910
import androidx.compose.foundation.layout.Box
1011
import androidx.compose.foundation.layout.WindowInsets
@@ -36,7 +37,6 @@ import dev.marlonlom.mocca.mobile.ui.util.CustomTabsOpener
3637
import dev.marlonlom.mocca.mobile.ui.util.FeedbackOpener
3738
import kotlinx.coroutines.CoroutineScope
3839
import kotlinx.coroutines.launch
39-
import timber.log.Timber
4040

4141
/**
4242
* Main content composable ui.
@@ -125,19 +125,19 @@ internal fun MainContent(mainUiState: MainUiState, onOnboarded: () -> Unit) = Mo
125125
},
126126
actions = SettingActions(
127127
onOssLicencesDisplayed = {
128-
Timber.d("[MainActivity] opening oss licenses window")
128+
Log.d("MainContent", "Opening oss licenses window")
129129
currentCtx.startActivity(
130130
Intent(currentCtx, OssLicensesMenuActivity::class.java),
131131
)
132132
},
133133
onOpeningExternalUrl = { urlText ->
134-
Timber.d("[MainActivity] opening external url: $urlText")
134+
Log.d("MainContent", "Opening external url: $urlText")
135135
if (urlText.isNotEmpty()) {
136136
CustomTabsOpener.openUrl(currentCtx, urlText)
137137
}
138138
},
139139
onFeedbackDisplayed = {
140-
Timber.d("[MainActivity] opening feedback window")
140+
Log.d("MainContent", "Opening feedback window")
141141
FeedbackOpener.rate(currentCtx)
142142
},
143143
),

0 commit comments

Comments
 (0)