chore(voice): voice is no longer an experiment
This commit is contained in:
parent
6a4b5d21e9
commit
273199889f
|
|
@ -28,7 +28,6 @@ class ExperimentInstance(default: Boolean) {
|
|||
object Experiments {
|
||||
val usePolar = ExperimentInstance(false)
|
||||
val enableServerIdentityOptions = ExperimentInstance(false)
|
||||
val useVoiceChats2p0 = ExperimentInstance(false)
|
||||
|
||||
suspend fun hydrateWithKv() {
|
||||
val kvStorage = KVStorage(StoatApplication.instance)
|
||||
|
|
@ -45,8 +44,5 @@ object Experiments {
|
|||
enableServerIdentityOptions.setEnabled(
|
||||
kvStorage.getBoolean("exp/enableServerIdentityOptions") == true
|
||||
)
|
||||
useVoiceChats2p0.setEnabled(
|
||||
kvStorage.getBoolean("exp/useVoiceChats2p0") == true
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
@ -116,7 +116,6 @@ import chat.stoat.api.internals.PermissionBit
|
|||
import chat.stoat.api.internals.has
|
||||
import chat.stoat.api.routes.channel.react
|
||||
import chat.stoat.api.routes.microservices.autumn.FileArgs
|
||||
import chat.stoat.api.settings.Experiments
|
||||
import chat.stoat.callbacks.Action
|
||||
import chat.stoat.callbacks.ActionChannel
|
||||
import chat.stoat.composables.chat.DateDivider
|
||||
|
|
@ -648,8 +647,7 @@ fun ChannelScreen(
|
|||
if (isDmLike &&
|
||||
viewModel.channel?.voice == null &&
|
||||
StoatAPI.voiceStateCache[channelId]?.participants.isNullOrEmpty() &&
|
||||
channelPermissions has PermissionBit.Connect &&
|
||||
Experiments.useVoiceChats2p0.isEnabled
|
||||
channelPermissions has PermissionBit.Connect
|
||||
) {
|
||||
IconButton(onClick = {
|
||||
scope.launch {
|
||||
|
|
@ -994,8 +992,7 @@ fun ChannelScreen(
|
|||
if ((viewModel.channel?.channelType == ChannelType.VoiceChannel ||
|
||||
viewModel.channel?.voice != null ||
|
||||
isDmLikeWithOngoingCall) &&
|
||||
channelPermissions has PermissionBit.Connect &&
|
||||
Experiments.useVoiceChats2p0.isEnabled
|
||||
channelPermissions has PermissionBit.Connect
|
||||
) {
|
||||
JoinVoiceChannelButton(channelId)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@ import chat.stoat.BuildConfig
|
|||
import chat.stoat.StoatApplication
|
||||
import chat.stoat.api.settings.Experiments
|
||||
import chat.stoat.api.settings.LoadedSettings
|
||||
import chat.stoat.composables.markdown.prose.UIMarkdown
|
||||
import chat.stoat.persistence.KVStorage
|
||||
import chat.stoat.settings.dsl.SettingsPage
|
||||
import chat.stoat.settings.dsl.SubcategoryContentInsets
|
||||
|
|
@ -40,7 +39,6 @@ class ExperimentsSettingsScreenViewModel : ViewModel() {
|
|||
usePolarChecked.value = Experiments.usePolar.isEnabled
|
||||
enableServerIdentityOptionsChecked.value =
|
||||
Experiments.enableServerIdentityOptions.isEnabled
|
||||
useVoiceChats2p0.value = Experiments.useVoiceChats2p0.isEnabled
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -89,15 +87,6 @@ class ExperimentsSettingsScreenViewModel : ViewModel() {
|
|||
}
|
||||
}
|
||||
|
||||
val useVoiceChats2p0 = mutableStateOf(false)
|
||||
|
||||
fun setUseVoiceChats2p0(value: Boolean) {
|
||||
viewModelScope.launch {
|
||||
kv.set("exp/useVoiceChats2p0", value)
|
||||
Experiments.useVoiceChats2p0.setEnabled(value)
|
||||
useVoiceChats2p0.value = value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalMaterial3ExpressiveApi::class)
|
||||
|
|
@ -182,22 +171,6 @@ fun ExperimentsSettingsScreen(
|
|||
modifier = Modifier.clickable { viewModel.setEnableServerIdentityOptionsChecked(!viewModel.enableServerIdentityOptionsChecked.value) }
|
||||
)
|
||||
|
||||
ListItem(
|
||||
headlineContent = {
|
||||
Text("Voice Chats 2.0")
|
||||
},
|
||||
supportingContent = {
|
||||
UIMarkdown("Enable voice chats support.\n‼️ **Not available in this build!** ‼️")
|
||||
},
|
||||
trailingContent = {
|
||||
Switch(
|
||||
checked = viewModel.useVoiceChats2p0.value,
|
||||
onCheckedChange = null
|
||||
)
|
||||
},
|
||||
modifier = Modifier.clickable { viewModel.setUseVoiceChats2p0(!viewModel.useVoiceChats2p0.value) }
|
||||
)
|
||||
|
||||
Subcategory(
|
||||
title = {
|
||||
Text("Disable experiments")
|
||||
|
|
|
|||
Loading…
Reference in New Issue