Skip to content
Snippets Groups Projects
Commit 834c5450 authored by liviaarumsari's avatar liviaarumsari
Browse files

chore: delete unused lib

parent 2fa955bc
1 merge request!17refactor shared pref
...@@ -71,6 +71,5 @@ dependencies { ...@@ -71,6 +71,5 @@ dependencies {
androidTestImplementation(libs.androidx.junit) androidTestImplementation(libs.androidx.junit)
androidTestImplementation(libs.androidx.espresso.core) androidTestImplementation(libs.androidx.espresso.core)
implementation("com.github.PhilJay:MPAndroidChart:v3.1.0") implementation("com.github.PhilJay:MPAndroidChart:v3.1.0")
implementation("org.jsoup:jsoup:1.14.3")
implementation("androidx.datastore:datastore-preferences:1.0.0") implementation("androidx.datastore:datastore-preferences:1.0.0")
} }
\ No newline at end of file
package com.example.abe.utils package com.example.abe.utils
import com.example.abe.connection.ConnectivityObserver import com.example.abe.connection.ConnectivityObserver
import org.jsoup.Jsoup
import org.jsoup.safety.Safelist
fun isConnected(networkState: ConnectivityObserver.NetworkState?): Boolean { fun isConnected(networkState: ConnectivityObserver.NetworkState?): Boolean {
return (networkState != null && (networkState == ConnectivityObserver.NetworkState.AVAILABLE || networkState == ConnectivityObserver.NetworkState.LOSING)) return (networkState != null && (networkState == ConnectivityObserver.NetworkState.AVAILABLE || networkState == ConnectivityObserver.NetworkState.LOSING))
...@@ -11,7 +9,3 @@ fun isConnected(networkState: ConnectivityObserver.NetworkState?): Boolean { ...@@ -11,7 +9,3 @@ fun isConnected(networkState: ConnectivityObserver.NetworkState?): Boolean {
fun isNumericValid(input: String): Boolean { fun isNumericValid(input: String): Boolean {
return input.matches("\\d+".toRegex()) return input.matches("\\d+".toRegex())
} }
fun sanitizeHtml(input: String): String {
return Jsoup.clean(input, Safelist.basic())
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment