mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 21:11:28 +07:00
[rd debugger] IJPL-211527 Always generate new requestId for modifications that require BE notification
GitOrigin-RevId: 8addf0204bda7e8f40b5ab6c5c0c67789ab534c7
This commit is contained in:
committed by
intellij-monorepo-bot
parent
da68b326d3
commit
ea07073dfe
@@ -47,7 +47,7 @@ internal fun createXBreakpointProxy(
|
||||
internal open class FrontendXBreakpointProxy(
|
||||
override val project: Project,
|
||||
parentCs: CoroutineScope,
|
||||
private val dto: XBreakpointDto,
|
||||
dto: XBreakpointDto,
|
||||
override val type: XBreakpointTypeProxy,
|
||||
private val breakpointRequestCounter: FrontendBreakpointRequestCounter,
|
||||
private val _onBreakpointChange: (XBreakpointProxy) -> Unit,
|
||||
@@ -77,14 +77,15 @@ internal open class FrontendXBreakpointProxy(
|
||||
newValue: T,
|
||||
getter: (XBreakpointDtoState) -> T,
|
||||
copy: (XBreakpointDtoState) -> XBreakpointDtoState,
|
||||
forceRequestWithoutUpdate: Boolean,
|
||||
): Long {
|
||||
var requestId: Long = REQUEST_IS_NOT_NEEDED
|
||||
_state.update { old ->
|
||||
if (getter(old) == newValue) {
|
||||
if (!forceRequestWithoutUpdate && getter(old) == newValue) {
|
||||
return REQUEST_IS_NOT_NEEDED
|
||||
}
|
||||
val newState = copy(old)
|
||||
if (newState == old) {
|
||||
if (!forceRequestWithoutUpdate && newState == old) {
|
||||
return REQUEST_IS_NOT_NEEDED
|
||||
}
|
||||
requestId = breakpointRequestCounter.increment()
|
||||
@@ -105,8 +106,8 @@ internal open class FrontendXBreakpointProxy(
|
||||
forceRequestWithoutUpdate: Boolean = false,
|
||||
sendRequest: suspend (Long) -> Unit,
|
||||
) {
|
||||
val requestId = getRequestIdForStateUpdate(newValue, getter, copy)
|
||||
if (requestId == REQUEST_IS_NOT_NEEDED && !forceRequestWithoutUpdate) {
|
||||
val requestId = getRequestIdForStateUpdate(newValue, getter, copy, forceRequestWithoutUpdate)
|
||||
if (requestId == REQUEST_IS_NOT_NEEDED) {
|
||||
return
|
||||
}
|
||||
afterStateChanged()
|
||||
|
||||
Reference in New Issue
Block a user