aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/src/main
diff options
context:
space:
mode:
authorMarvin Borner2018-08-30 00:15:00 +0200
committerMarvin Borner2018-08-30 00:16:44 +0200
commitf1114c8c55a53de5f9cf740a482bb81105684cd3 (patch)
tree27f17219bac9cb637e8635d9e948bb59931540ca /app/src/main
parent71c58e946bc2b1843452ec75c3ce963036e4b8c5 (diff)
Removed ThemeUtil from old package
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/com/no_name/no_name/Util/ThemeUtil.kt34
1 files changed, 0 insertions, 34 deletions
diff --git a/app/src/main/java/com/no_name/no_name/Util/ThemeUtil.kt b/app/src/main/java/com/no_name/no_name/Util/ThemeUtil.kt
deleted file mode 100644
index 5125f12..0000000
--- a/app/src/main/java/com/no_name/no_name/Util/ThemeUtil.kt
+++ /dev/null
@@ -1,34 +0,0 @@
-package com.no_name.no_name.util
-
-import android.content.Context
-import com.madapps.prefrences.EasyPrefrences
-import com.no_name.no_name.util.ThemeUtil.isDarkTheme
-
-/**
- * Get the name of the theme depending on [actionBar] and [isDarkTheme]
- */
-object ThemeUtil {
- /**
- * Checks if the theme saved in sharedPreferences is dark/light
- */
- private fun isDarkTheme(context: Context): Boolean {
- val sharedPrefs = EasyPrefrences(context)
- val darkTheme: Boolean? = sharedPrefs.getBoolean("dark_theme_switch")
- darkTheme?.let {
- return darkTheme
- } ?: run {
- return false
- }
- }
-
- /**
- * Get the name of the theme depending on [actionBar] and [isDarkTheme]
- */
- fun getThemeName(context: Context): String {
- return if (isDarkTheme(context)) {
- "dark"
- } else {
- "light"
- }
- }
-} \ No newline at end of file