mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-330211 use a sequence
Converted getShownThemes in LafManagerImpl to Kotlin Sequence to improve performance. Sequence interface in Kotlin allows to perform computation on elements as needed, which could reduce the overhead in theme fetching. GitOrigin-RevId: a11bf6fe8c53916517b76c5e2093e31076693401
This commit is contained in:
committed by
intellij-monorepo-bot
parent
2cc7b5fda2
commit
77c8abea2a
@@ -916,7 +916,7 @@ class LafManagerImpl(private val coroutineScope: CoroutineScope) : LafManager(),
|
||||
get() {
|
||||
val lightLaFs = ArrayList<UIThemeLookAndFeelInfo>()
|
||||
val darkLaFs = ArrayList<UIThemeLookAndFeelInfo>()
|
||||
for (lafInfo in ThemeListProvider.getInstance().getShownThemes().flatten()) {
|
||||
for (lafInfo in ThemeListProvider.getInstance().getShownThemes().asSequence().flatten()) {
|
||||
if (lafInfo.theme.isDark) {
|
||||
darkLaFs.add(lafInfo)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user