File tree Expand file tree Collapse file tree 4 files changed +11
-5
lines changed
Samples/AvaloniaExample/ViewModels Expand file tree Collapse file tree 4 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 1717 <PackageLicenseExpression >MIT</PackageLicenseExpression >
1818 <PackageProjectUrl >https://github.com/JordanMarr/ReactiveElmish.Avalonia</PackageProjectUrl >
1919 <PackageTags >Avalonia F# fsharp Elmish Elm</PackageTags >
20- <Version >1.0.0-beta.3 </Version >
20+ <Version >1.0.0-beta.4 </Version >
2121 <!-- Turn on warnings for unused values (arguments and let bindings) -->
2222 <OtherFlags >$(OtherFlags) --warnon:1182</OtherFlags >
2323 <TargetsForTfmSpecificBuildOutput >$(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage</TargetsForTfmSpecificBuildOutput >
Original file line number Diff line number Diff line change @@ -25,8 +25,14 @@ module SourceList =
2525 sourceList.Remove item |> ignore
2626 sourceList
2727
28- let clear < 'T > ( sourceList : SourceList < 'T >) =
29- sourceList.Clear()
28+ // Removed because it would cause list to permanently disappear (unsubscribe maybe?).
29+ //let clear<'T> (sourceList: SourceList<'T>) =
30+ // sourceList.Clear()
31+ // sourceList
32+
33+ let removeAll < 'T > ( sourceList : SourceList < 'T >) =
34+ for item in sourceList.Items do
35+ sourceList.Remove item |> ignore
3036 sourceList
3137
3238/// Functional helpers for DynamicData.SourceCache.
Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ module Chart =
112112 { model with
113113 // deactivate the AutoUpdate ToggleButton in the UI
114114 IsAutoUpdateChecked = false
115- Actions = model.Actions |> SourceList.clear |> SourceList.add { Description = " Reset Chart" ; Timestamp = DateTime.Now }
115+ Actions = model.Actions |> SourceList.removeAll |> SourceList.add { Description = " Reset Chart" ; Timestamp = DateTime.Now }
116116 }
117117 | SetIsAutoUpdateChecked isChecked ->
118118 { model with
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ module Counter =
3636 | Reset ->
3737 {
3838 Count = 0
39- Actions = model.Actions |> SourceList.clear |> SourceList.add { Description = " Reset" ; Timestamp = DateTime.Now }
39+ Actions = model.Actions |> SourceList.removeAll |> SourceList.add { Description = " Reset" ; Timestamp = DateTime.Now }
4040 }
4141
4242open Counter
You can’t perform that action at this time.
0 commit comments