mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[recent files] IJPL-178295 Increase the buffer size to avoid loosing recent files
The limit in the previous implementation affected only the case when there are more than SWITCHER_ELEMENTS_LIMIT opened editor tabs. Files fetched from the editor history or changed files history were not affected by the limit, and this must stay the same in the new implementation This is a fast fix, but proper fix is going to be delivered soon. It will group files into batches and deliver them altogether -> there will be no partial data losses. Instead, we will be able to drop old requested data and always display only the freshest batch of files which would be consistent with the fallback monolith implementation GitOrigin-RevId: 70ae325ba6859707319eeb18f6158279304bb640
This commit is contained in:
committed by
intellij-monorepo-bot
parent
97e4f47c91
commit
762718eb48
+1
-1
@@ -21,7 +21,7 @@ import kotlinx.coroutines.flow.*
|
||||
@Service(Service.Level.PROJECT)
|
||||
internal class RecentFileEventsPerProjectHolder {
|
||||
private val recentFiles = MutableSharedFlow<RecentFilesEvent>(
|
||||
extraBufferCapacity = SWITCHER_ELEMENTS_LIMIT,
|
||||
extraBufferCapacity = 100,
|
||||
onBufferOverflow = BufferOverflow.DROP_OLDEST
|
||||
)
|
||||
|
||||
|
||||
+1
-1
@@ -143,4 +143,4 @@ private fun createRecentFileViewModel(virtualFile: VirtualFile, project: Project
|
||||
)
|
||||
}
|
||||
|
||||
internal const val SWITCHER_ELEMENTS_LIMIT: Int = 30
|
||||
private const val SWITCHER_ELEMENTS_LIMIT: Int = 30
|
||||
Reference in New Issue
Block a user