Skip to content

Commit

Permalink
Move PRIMARY_COLOR_CODE to UiUtils
Browse files Browse the repository at this point in the history
  • Loading branch information
LunarX authored and KevinBoulongne committed Aug 6, 2024
1 parent 2b637f9 commit d078018
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ import com.infomaniak.mail.ui.newMessage.NewMessageViewModel.ImportationResult
import com.infomaniak.mail.ui.newMessage.NewMessageViewModel.UiFrom
import com.infomaniak.mail.utils.SentryDebug
import com.infomaniak.mail.utils.SignatureUtils
import com.infomaniak.mail.utils.UiUtils.PRIMARY_COLOR_CODE
import com.infomaniak.mail.utils.Utils
import com.infomaniak.mail.utils.Utils.PRIMARY_COLOR_CODE
import com.infomaniak.mail.utils.WebViewUtils
import com.infomaniak.mail.utils.WebViewUtils.Companion.destroyAndClearHistory
import com.infomaniak.mail.utils.WebViewUtils.Companion.setupNewMessageWebViewSettings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import com.infomaniak.html.cleaner.HtmlSanitizer
import com.infomaniak.mail.R
import com.infomaniak.mail.data.models.message.Message
import com.infomaniak.mail.utils.JsoupParserUtil.jsoupParseWithLog
import com.infomaniak.mail.utils.Utils.PRIMARY_COLOR_CODE
import com.infomaniak.mail.utils.UiUtils.PRIMARY_COLOR_CODE
import com.infomaniak.mail.utils.extensions.getAttributeColor
import com.infomaniak.mail.utils.extensions.loadCss
import com.infomaniak.mail.utils.extensions.readRawResource
Expand Down
1 change: 1 addition & 0 deletions app/src/main/java/com/infomaniak/mail/utils/UiUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import com.infomaniak.mail.utils.extensions.updateNavigationBarColor
object UiUtils {

const val FULLY_SLID = 1.0f
const val PRIMARY_COLOR_CODE = "--kmail-primary-color"

@ColorInt
fun pointBetweenColors(@ColorInt from: Int, @ColorInt to: Int, percent: Float): Int {
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/java/com/infomaniak/mail/utils/Utils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ object Utils {

const val SCHEME_SMSTO = "smsto:"

const val PRIMARY_COLOR_CODE = "--kmail-primary-color"

fun colorToHexRepresentation(color: Int) = "#" + color.toHexString().substring(2 until 8)

fun isPermanentDeleteFolder(role: FolderRole?): Boolean {
Expand Down

0 comments on commit d078018

Please sign in to comment.