Skip to content

Commit

Permalink
(#421) Previewer: do not use IDE read/write lock for primitive actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ForNeVeR committed Sep 19, 2024
1 parent d47baf7 commit 479a6f1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a

When considering version compatibility (and thus incrementing the major version), we only consider the configuration file major user experience changes. The host IDE version is not considered a version compatibility factor (since otherwise we'd have to increase the major version pretty often and that would make no sense).

## [1.5.1] - 2024-09-19
### Fixed
- [#421: Publish Action Triggers Undo Command](https://github.com/ForNeVeR/AvaloniaRider/issues/421).

## [1.5.0] - 2024-09-01
### Changed
- **(Requirement update!)** Update the minimally supported Rider version to 2024.2.
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
kotlin.stdlib.default.dependency=false

pluginVersionBase=1.5.0
pluginVersionBase=1.5.1

untilBuildVersion=243.*

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@ package me.fornever.avaloniarider.previewer

import com.intellij.execution.ui.ConsoleView
import com.intellij.openapi.application.EDT
import com.intellij.openapi.command.WriteCommandAction
import com.intellij.openapi.diagnostic.Logger
import com.intellij.openapi.diagnostic.debug
import com.intellij.openapi.fileEditor.FileDocumentManager
import com.intellij.openapi.project.Project
import com.intellij.openapi.util.Computable
import com.intellij.openapi.vfs.VirtualFile
import com.intellij.platform.backend.workspace.WorkspaceModel
import com.intellij.ui.scale.JBUIScale
Expand Down Expand Up @@ -124,10 +122,8 @@ class AvaloniaPreviewerSessionController(

private val inFlightUpdate = Property(false)

private var _session: AvaloniaPreviewerSession? = null
private var session: AvaloniaPreviewerSession?
get() = application.runReadAction(Computable { _session })
set(value) = WriteCommandAction.runWriteCommandAction(project) { _session = value }
@Volatile
private var session: AvaloniaPreviewerSession? = null

private val sessionLifetimeSource = SequentialLifetimes(controllerLifetime)
private var currentSessionLifetime: LifetimeDefinition? = null
Expand Down

0 comments on commit 479a6f1

Please sign in to comment.