Skip to content

Commit

Permalink
Change Editor text size (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulcoding810 authored Dec 6, 2024
1 parent a96eba8 commit 14dbb95
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ package com.paulcoding.hviewer.ui.page

import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.paulcoding.hviewer.BuildConfig
import com.paulcoding.hviewer.MainApp.Companion.appContext
import com.paulcoding.hviewer.database.DatabaseProvider
import com.paulcoding.hviewer.helper.alsoLog
import com.paulcoding.hviewer.helper.crashLogDir
import com.paulcoding.hviewer.helper.scriptsDir
import com.paulcoding.hviewer.model.PostItem
Expand Down Expand Up @@ -34,10 +36,11 @@ class AppViewModel : ViewModel() {
_stateFlow.update { it.copy(site = site to siteConfig) }
}


data class UiState(
val post: PostItem = PostItem(),
val site: Pair<String, SiteConfig> = "" to SiteConfig(),
val isDevMode: Boolean = false,
val isDevMode: Boolean = BuildConfig.DEBUG.alsoLog("debug"),
)

fun setDevMode(isDevMode: Boolean) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ private fun setCodeEditorFactory(

editor.apply {
setText(state.content)
setTextSize(14f)
editor.editable = state.editable
}
state.editor = editor
Expand Down

0 comments on commit 14dbb95

Please sign in to comment.