Skip to content

Commit

Permalink
Don't show GPT option if disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
aqua-ix committed Dec 4, 2024
1 parent 7c7b596 commit 961f457
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/src/main/java/com/aqua_ix/youbimiku/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,9 @@ class MainActivity : AppCompatActivity(), View.OnClickListener, DialogListener {
}

private fun showAIModelDialog(cancelable: Boolean = true) {
val aiModels = AIModelConfig.entries.toTypedArray()
val aiModels = AIModelConfig.entries.filter {
it != AIModelConfig.OPEN_AI || remoteConfig.getBoolean(RemoteConfigKey.OPENAI_ENABLED)
}.toTypedArray()
val aiModelNames = aiModels.map { getDisplayName(this, it) }.toTypedArray()
val currentIndex = aiModels.indexOfFirst { it.name == getAIModel(this) }

Expand Down

0 comments on commit 961f457

Please sign in to comment.