Skip to content

Commit

Permalink
add autofield :ws_disconnected
Browse files Browse the repository at this point in the history
  • Loading branch information
hhaensel committed Nov 6, 2024
1 parent b73f46b commit b245f35
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/Stipple.jl
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,8 @@ function init_storage()
:modes__ => :(modes__::Stipple.LittleDict{Symbol,Int} = Stipple.LittleDict{Symbol,Int}()),
:isready => :(isready::Stipple.R{Bool} = false),
:isprocessing => :(isprocessing::Stipple.R{Bool} = false),
:fileuploads => :(fileuploads::Stipple.R{Dict{AbstractString,AbstractString}} = Dict{AbstractString,AbstractString}())
:fileuploads => :(fileuploads::Stipple.R{Dict{AbstractString,AbstractString}} = Dict{AbstractString,AbstractString}()),
:ws_disconnected => :(ws_disconnected::Stipple.R{Bool} = false)
)
end

Expand Down
3 changes: 2 additions & 1 deletion src/stipple/reactivity.jl
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ function setchannel(m::M, value) where {M<:ReactiveModel}
setfield!(m, CHANNELFIELDNAME, ChannelName(value))
end

const AUTOFIELDS = [:isready, :isprocessing, :fileuploads] # not DRY but we need a reference to the auto-set fields
const AUTOFIELDS = [:isready, :isprocessing, :fileuploads, :ws_disonnected] # not DRY but we need a reference to the auto-set fields
const INTERNALFIELDS = [CHANNELFIELDNAME, :modes__] # not DRY but we need a reference to the auto-set fields

@pour reactors begin
Expand All @@ -181,6 +181,7 @@ const INTERNALFIELDS = [CHANNELFIELDNAME, :modes__] # not DRY but we need a refe
isprocessing::Stipple.R{Bool} = false
channel_::String = "" # not sure what this does if it's empty
fileuploads::Stipple.R{Dict{AbstractString,AbstractString}} = Dict{AbstractString,AbstractString}()
ws_disconnected::Stipple.R{Bool} = false
end

@mix Stipple.@with_kw mutable struct old_reactive
Expand Down

0 comments on commit b245f35

Please sign in to comment.