We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c6b8fa5 commit b892560Copy full SHA for b892560
discussion/src/main/java/org/openedx/discussion/presentation/threads/DiscussionAddThreadViewModel.kt
@@ -65,9 +65,8 @@ class DiscussionAddThreadViewModel(
65
}
66
67
fun getHandledTopicById(topicId: String): Pair<String, String> {
68
- return getHandledTopics()
69
- .find { it.second == topicId }
70
- ?: getHandledTopics()[0]
+ val topics = getHandledTopics()
+ return topics.find { it.second == topicId } ?: topics.firstOrNull() ?: Pair("", "")
71
72
73
fun sendThreadAdded() {
0 commit comments