Remove Plausible
Some checks failed
Build & Test / Validate (push) Successful in 17s
Build & Test / Run Unit Tests (push) Failing after 6m18s

This commit is contained in:
William Brawner 2024-11-16 17:54:43 -07:00
parent dba5313c74
commit 0b26a16f1f
Signed by: wbrawner
GPG key ID: 8FF12381C6C90D35
6 changed files with 12 additions and 29 deletions

View file

@ -16,7 +16,18 @@ object PiHelperModule {
@Provides @Provides
@Singleton @Singleton
fun providesAnalyticsHelper(): AnalyticsHelper = PlausibleAnalyticsHelper fun providesAnalyticsHelper(): AnalyticsHelper = object : AnalyticsHelper {
override fun pageView(route: Route) {
// Not implemented
}
override fun event(
event: AnalyticsEvent,
route: Route
) {
// Not implemented
}
}
@Provides @Provides
@Singleton @Singleton

View file

@ -7,6 +7,4 @@
<string name="action_disable_30_seconds_short">Disable for 30 seconds</string> <string name="action_disable_30_seconds_short">Disable for 30 seconds</string>
<string name="action_disable_5_minutes">Disable for 5 minutes</string> <string name="action_disable_5_minutes">Disable for 5 minutes</string>
<string name="action_disable_5_minutes_short">Disable for 5 minutes</string> <string name="action_disable_5_minutes_short">Disable for 5 minutes</string>
<string name="plausible_domain">pihelper.android.wbrawner.com</string>
<string name="plausible_host">https://plausible.wbrawner.com</string>
</resources> </resources>

View file

@ -23,7 +23,6 @@ material = "1.12.0"
maxSdk = "35" maxSdk = "35"
minSdk = "23" minSdk = "23"
okhttp = "4.10.0" okhttp = "4.10.0"
plausible = "0.1.0-SNAPSHOT"
settings = "0.8.1" settings = "0.8.1"
versionCode = "5" versionCode = "5"
versionName = "1.1.1" versionName = "1.1.1"
@ -63,7 +62,6 @@ material = { module = "com.google.android.material:material", version.ref = "mat
mockwebserver = { module = "com.squareup.okhttp3:mockwebserver", version.ref = "okhttp" } mockwebserver = { module = "com.squareup.okhttp3:mockwebserver", version.ref = "okhttp" }
multiplatform-settings = { module = "com.russhwolf:multiplatform-settings-no-arg", version.ref = "settings" } multiplatform-settings = { module = "com.russhwolf:multiplatform-settings-no-arg", version.ref = "settings" }
navigation-compose = { module = "androidx.navigation:navigation-compose", version = "navigation" } navigation-compose = { module = "androidx.navigation:navigation-compose", version = "navigation" }
plausible = { module = "com.wbrawner.plausible:plausible-android", version.ref = "plausible" }
preference = { module = "androidx.preference:preference-ktx", version = "1.2.0" } preference = { module = "androidx.preference:preference-ktx", version = "1.2.0" }
test-ext = { module = "androidx.test.ext:junit", version = "1.1.5" } test-ext = { module = "androidx.test.ext:junit", version = "1.1.5" }

View file

@ -37,7 +37,6 @@ kotlin {
val androidMain by getting { val androidMain by getting {
dependencies { dependencies {
implementation(libs.plausible)
api(compose.runtime) api(compose.runtime)
} }
} }

View file

@ -1,18 +0,0 @@
package com.wbrawner.pihelper.shared
import com.wbrawner.plausible.android.Plausible
object PlausibleAnalyticsHelper : AnalyticsHelper {
override fun pageView(route: Route) {
Plausible.pageView(route.path)
}
override fun event(event: AnalyticsEvent, route: Route) {
val props = when (event) {
is AnalyticsEvent.DisableButtonClicked -> mapOf("duration" to event.duration)
is AnalyticsEvent.LinkClicked -> mapOf("link" to event.link)
else -> null
}
Plausible.event(event.name, route.path, props = props)
}
}

View file

@ -104,11 +104,6 @@ fun InfoScreen(onBackClicked: () -> Unit, onForgetPiholeClicked: () -> Unit) {
) { ) {
message.getStringAnnotations(it, it).firstOrNull()?.let { annotation -> message.getStringAnnotations(it, it).firstOrNull()?.let { annotation ->
uriHandler.openUri(annotation.item) uriHandler.openUri(annotation.item)
// TODO: Move this to the store?
// PlausibleAnalyticsHelper.event(
// AnalyticsEvent.LinkClicked(annotation.item),
// Route.ABOUT
// )
} }
} }
TextButton(onClick = onForgetPiholeClicked) { TextButton(onClick = onForgetPiholeClicked) {