Fix color references
This commit is contained in:
parent
219eba1261
commit
30d97c909e
4 changed files with 8 additions and 5 deletions
|
|
@ -15,9 +15,9 @@ class Application : Application() {
|
|||
}
|
||||
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
if (repository.getDynamicColorsEnabled()) {
|
||||
DynamicColors.applyToActivitiesIfAvailable(this)
|
||||
}
|
||||
super.onCreate()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,10 @@ class Colors {
|
|||
return MaterialColors.getColor(context, R.attr.colorPrimary, Color.GREEN)
|
||||
}
|
||||
|
||||
fun linkColor(context: Context): Int {
|
||||
return MaterialColors.getColor(context, R.attr.colorPrimary, Color.GREEN)
|
||||
}
|
||||
|
||||
fun itemSelectedBackground(context: Context): Int {
|
||||
return SurfaceColors.getColorForElevation(context, 10f)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,10 @@
|
|||
package io.heckel.ntfy.util
|
||||
|
||||
import android.content.Context
|
||||
import android.graphics.Paint
|
||||
import android.graphics.Typeface
|
||||
import android.text.style.*
|
||||
import android.text.util.Linkify
|
||||
import androidx.core.content.ContextCompat
|
||||
import io.heckel.ntfy.R
|
||||
import io.heckel.ntfy.ui.Colors
|
||||
import io.noties.markwon.*
|
||||
import io.noties.markwon.core.CorePlugin
|
||||
import io.noties.markwon.core.CoreProps
|
||||
|
|
@ -36,7 +34,7 @@ internal object MarkwonFactory {
|
|||
.usePlugin(object : AbstractMarkwonPlugin() {
|
||||
override fun configureTheme(builder: MarkwonTheme.Builder) {
|
||||
builder
|
||||
.linkColor(ContextCompat.getColor(context, R.color.teal))
|
||||
.linkColor(Colors.linkColor(context))
|
||||
.isLinkUnderlined(true)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -14,3 +14,4 @@ org.gradle.jvmargs=-Xmx1536m
|
|||
android.useAndroidX=true
|
||||
# Kotlin code style for this project: "official" or "obsolete":
|
||||
kotlin.code.style=official
|
||||
android.nonTransitiveRClass=false
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue