IDEA-340835 don't overwrite recent project info if it's already considered recent

GitOrigin-RevId: bc3a6a4531e6475e7e312b317df2b835d2873121
This commit is contained in:
Vadim Salavatov
2024-03-12 17:22:00 +00:00
committed by intellij-monorepo-bot
parent be928b3473
commit ddfb2ec230
@@ -261,10 +261,13 @@ open class RecentProjectsManagerBase(coroutineScope: CoroutineScope) :
}
}
/**
* No-op if [path] is already present in recent projects
*/
fun addRecentPath(path: String, info: RecentProjectMetaInfo) {
synchronized(stateLock) {
state.additionalInfo.put(path, info)
modCounter.increment()
val presentInfo = state.additionalInfo.putIfAbsent(path, info)
if (presentInfo == null) modCounter.increment()
}
}