fix(core/scripting): ff menu theme
This commit is contained in:
@@ -31,8 +31,8 @@ abstract class ConfigInterface : AbstractBinding("config", BindingSide.COMMON) {
|
||||
@JSFunction fun getDouble(key: String): Double? = getDouble(key, null)
|
||||
@JSFunction fun getDouble(key: String, defaultValue: Double?): Double? = get(key, defaultValue.toString())?.toDoubleOrNull() ?: defaultValue
|
||||
|
||||
@JSFunction fun getBoolean(key: String): Boolean? = getBoolean(key, null)
|
||||
@JSFunction fun getBoolean(key: String, defaultValue: Boolean?): Boolean? = get(key, defaultValue.toString())?.toBoolean() ?: defaultValue
|
||||
@JSFunction fun getBoolean(key: String): Boolean = getBoolean(key, false)
|
||||
@JSFunction fun getBoolean(key: String, defaultValue: Boolean): Boolean = get(key, defaultValue.toString())?.toBoolean() ?: defaultValue
|
||||
|
||||
@JSFunction fun getLong(key: String): Long? = getLong(key, null)
|
||||
@JSFunction fun getLong(key: String, defaultValue: Long?): Long? = get(key, defaultValue.toString())?.toLongOrNull() ?: defaultValue
|
||||
|
||||
@@ -12,7 +12,11 @@ import android.widget.CompoundButton
|
||||
import android.widget.LinearLayout
|
||||
import android.widget.ProgressBar
|
||||
import android.widget.Switch
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Surface
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.ui.Modifier
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.Job
|
||||
import kotlinx.coroutines.delay
|
||||
@@ -373,12 +377,17 @@ class FriendFeedInfoMenu : AbstractMenu() {
|
||||
|
||||
orientation = LinearLayout.VERTICAL
|
||||
addView(createComposeView(view.context) {
|
||||
ScriptInterface(interfaceBuilder = remember {
|
||||
interfaceManager.buildInterface(EnumScriptInterface.FRIEND_FEED_CONTEXT_MENU, mapOf(
|
||||
"conversationId" to conversationId,
|
||||
"userId" to targetUser
|
||||
))
|
||||
} ?: return@createComposeView)
|
||||
Surface(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
color = MaterialTheme.colorScheme.surface
|
||||
) {
|
||||
ScriptInterface(interfaceBuilder = remember {
|
||||
interfaceManager.buildInterface(EnumScriptInterface.FRIEND_FEED_CONTEXT_MENU, mapOf(
|
||||
"conversationId" to conversationId,
|
||||
"userId" to targetUser
|
||||
))
|
||||
} ?: return@Surface)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user