This commit is contained in:
James Clancey 2019-07-15 15:16:46 -08:00
Родитель e0980da98d
Коммит fe22992974
2 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -89,7 +89,7 @@ public class MainPage : View {
readonly State<string> text = "Hello World";
public MyPage() {
Body = () => new Stack {
Body = () => new VStack {
new Text (text),
new Button("Update Text",
() => state.Text = $"Click Count: {clickCount.Value++}" )
@ -114,7 +114,7 @@ public class MyPage : View {
readonly State<int> clickCount = new State<int> (1);
public MyPage() {
Body = () => new Stack {
Body = () => new VStack {
new Text (()=> $"Click Count: {clickCount}"),
new Button("Update Text", ()=>{
clickCount.Value++;

Просмотреть файл

@ -87,10 +87,10 @@ namespace HotUI {
}
if(newView is ContentView ncView && oldView is ContentView ocView)
{
return ncView.Content?.DiffUpdate(ocView.Content);
ncView.Content?.DiffUpdate(ocView.Content);
}
//Yes if one is IContainer, the other is too!
if (newView is IContainerView newContainer && oldView is IContainerView oldContainer) {
else if (newView is IContainerView newContainer && oldView is IContainerView oldContainer) {
var newChildren = newContainer.GetChildren ();
var oldChildren = oldContainer.GetChildren ().ToList ();
for (var i = 0; i < Math.Max (newChildren.Count, oldChildren.Count); i++) {