Fixed diff update
This commit is contained in:
Родитель
e0980da98d
Коммит
fe22992974
|
@ -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++) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче