FIX: Reset dirtyState on dis(connect)
This commit is contained in:
@@ -197,6 +197,7 @@ export const useDeviceStore = defineStore('device', {
|
|||||||
connectDevice(deviceId: string | undefined = undefined, updateDevice: boolean = true) {
|
connectDevice(deviceId: string | undefined = undefined, updateDevice: boolean = true) {
|
||||||
if (deviceId) {
|
if (deviceId) {
|
||||||
this.currentDeviceId = deviceId
|
this.currentDeviceId = deviceId
|
||||||
|
this.setDirtyState(false)
|
||||||
if (updateDevice) {
|
if (updateDevice) {
|
||||||
nanoIpc.connect(deviceId)
|
nanoIpc.connect(deviceId)
|
||||||
}
|
}
|
||||||
@@ -206,6 +207,7 @@ export const useDeviceStore = defineStore('device', {
|
|||||||
},
|
},
|
||||||
disconnectDevice(deviceId: string, updateDevice: boolean = true) {
|
disconnectDevice(deviceId: string, updateDevice: boolean = true) {
|
||||||
this.currentDeviceId = null
|
this.currentDeviceId = null
|
||||||
|
this.setDirtyState(false)
|
||||||
if (updateDevice) {
|
if (updateDevice) {
|
||||||
nanoIpc.disconnect(deviceId)
|
nanoIpc.disconnect(deviceId)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user