Skip to content

Commit

Permalink
fix: move fontDir to method so it always refers to the latest value
Browse files Browse the repository at this point in the history
  • Loading branch information
goofyz committed Dec 30, 2023
1 parent d98fb61 commit fc3f59f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/main/java/com/osfans/trime/data/theme/FontManager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import com.osfans.trime.data.DataManager
import java.io.File

object FontManager {
val fontDir = File(DataManager.userDataDir, "fonts")

@JvmStatic
fun getTypeface(fontFileName: String): Typeface {
val fontDir = File(DataManager.userDataDir, "fonts")

val f = File(fontDir, fontFileName)
return if (f.exists()) {
Typeface.createFromFile(f)
Expand Down

0 comments on commit fc3f59f

Please sign in to comment.