Skip to content

Feature theme selection#19

Merged
yogeshbhagatcode merged 4 commits into
sherab-devfrom
feature-theme-selection
Nov 27, 2025
Merged

Feature theme selection#19
yogeshbhagatcode merged 4 commits into
sherab-devfrom
feature-theme-selection

Conversation

@yogeshbhagatcode

Copy link
Copy Markdown
Collaborator

No description provided.

@yogeshbhagatcode yogeshbhagatcode self-assigned this Nov 27, 2025
@yogeshbhagatcode yogeshbhagatcode merged commit cc1bd16 into sherab-dev Nov 27, 2025
1 of 4 checks passed
if (view is android.widget.TextView) {
// Check if text contains Tibetan characters (Unicode range U+0F00-U+0FFF)
val text = view.text?.toString() ?: ""
val hasTibetan = text.any { it.code in 0x0F00..0x0FFF }

Check warning

Code scanning / detekt

Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers. Warning

This expression contains a magic number. Consider defining it to a well named constant.
if (view is android.widget.TextView) {
// Check if text contains Tibetan characters (Unicode range U+0F00-U+0FFF)
val text = view.text?.toString() ?: ""
val hasTibetan = text.any { it.code in 0x0F00..0x0FFF }

Check warning

Code scanning / detekt

Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers. Warning

This expression contains a magic number. Consider defining it to a well named constant.

// Move text down 8dp to prevent overlap with icon
val density = resources.displayMetrics.density
view.translationY = 8 * density

Check warning

Code scanning / detekt

Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers. Warning

This expression contains a magic number. Consider defining it to a well named constant.
val v = getString(THEME_MODE, defValue = org.openedx.core.data.storage.ThemeMode.SYSTEM.name)
return try {
org.openedx.core.data.storage.ThemeMode.valueOf(v)
} catch (e: Exception) {

Check warning

Code scanning / detekt

The caught exception is swallowed. The original exception could be lost. Warning

The caught exception is swallowed. The original exception could be lost.
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.ui.platform.LocalContext
import org.koin.core.context.GlobalContext

Check warning

Code scanning / detekt

Detects unused imports Warning

Unused import
val value = prefs.getString("theme_mode", ThemeMode.SYSTEM.name) ?: ThemeMode.SYSTEM.name
val mode = try {
ThemeMode.valueOf(value)
} catch (e: Exception) {

Check warning

Code scanning / detekt

The caught exception is swallowed. The original exception could be lost. Warning

The caught exception is swallowed. The original exception could be lost.
@Composable
private fun LanguageOption(
name: String,
code: String,

Check warning

Code scanning / detekt

Function parameter is unused and should be removed. Warning

Function parameter code is unused.
Comment on lines +115 to +116

val topBarWidth by remember(key1 = windowSize) {

Check warning

Code scanning / detekt

Reports methods that have an empty first line. Warning

First line in a method block should not be empty
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants