Skip to content

Commit

Permalink
Remove nullability from linksColor
Browse files Browse the repository at this point in the history
This is done by using AppCompatResources instead of ColorCompat.
  • Loading branch information
keyboardsurfer committed Sep 10, 2018
1 parent 9310b6d commit 0b879b0
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions about/src/main/java/io/plaidapp/about/ui/AboutStyler.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,23 @@

package io.plaidapp.about.ui

import android.content.res.ColorStateList
import android.support.annotation.ColorInt
import android.support.v4.content.ContextCompat
import io.plaidapp.core.R as coreR
import android.support.v7.content.res.AppCompatResources
import io.plaidapp.core.util.ColorUtils
import javax.inject.Inject
import io.plaidapp.core.R as coreR

/**
* Provide style colors to links and highlights in [AboutActivity].
*/
class AboutStyler @Inject constructor(activity: AboutActivity) {

val linksColor = ContextCompat.getColorStateList(activity, coreR.color.plaid_links)!!
val linksColor: ColorStateList = AppCompatResources.getColorStateList(
activity,
coreR.color.plaid_links
)

@ColorInt
val highlightColor = ColorUtils.getThemeColor(
activity,
Expand Down

0 comments on commit 0b879b0

Please sign in to comment.