mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 04:52:00 +03:00
Remove useless method now that we are on API 21+
This commit is contained in:
parent
0ad059359f
commit
a343e25785
4 changed files with 0 additions and 53 deletions
|
@ -164,44 +164,6 @@ object ThemeUtils {
|
|||
return null
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the resource Id applied to the current theme
|
||||
*
|
||||
* @param c the context
|
||||
* @param resourceId the resource id in the light theme
|
||||
* @return the resource Id for the current theme
|
||||
*/
|
||||
// TODO Now that we are API 21, this is not necessary anymore
|
||||
fun getResourceId(c: Context, resourceId: Int): Int {
|
||||
val theme = getApplicationTheme(c)
|
||||
|
||||
return when (theme) {
|
||||
THEME_LIGHT_VALUE -> resourceId
|
||||
THEME_DARK_VALUE -> {
|
||||
return when (resourceId) {
|
||||
R.drawable.bg_search_edit_text_light -> R.drawable.bg_search_edit_text_dark
|
||||
else -> {
|
||||
Timber.w("Warning, missing case for wanted drawable in dark theme")
|
||||
resourceId
|
||||
}
|
||||
}
|
||||
}
|
||||
THEME_BLACK_VALUE -> {
|
||||
return when (resourceId) {
|
||||
R.drawable.bg_search_edit_text_light -> R.drawable.bg_search_edit_text_black
|
||||
else -> {
|
||||
Timber.w("Warning, missing case for wanted drawable in black theme")
|
||||
resourceId
|
||||
}
|
||||
}
|
||||
}
|
||||
else -> {
|
||||
Timber.w("Warning, missing theme: $theme")
|
||||
resourceId
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the menu icons colors
|
||||
*
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/riotx_search_background_mobile_black" />
|
||||
<corners android:radius="4dp" />
|
||||
</shape>
|
|
@ -1,5 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/riotx_search_background_mobile_dark" />
|
||||
<corners android:radius="4dp" />
|
||||
</shape>
|
|
@ -1,5 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/riotx_search_background_mobile_light" />
|
||||
<corners android:radius="4dp" />
|
||||
</shape>
|
Loading…
Reference in a new issue