Skip to content

Commit

Permalink
Fix #2146: SWIPE DELETE FUNCTION FREEZES APP (#2157)
Browse files Browse the repository at this point in the history
* fix stackoverflow

* space
  • Loading branch information
tian-lt authored Apr 11, 2024
1 parent 6ee1eb9 commit 1bc539f
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/Calculator/Views/Calculator.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ public void InitializeHistoryView(CalculatorApp.ViewModel.HistoryViewModel histo
}
}


public void UpdatePanelViewState()
{
UpdateHistoryState();
Expand Down Expand Up @@ -772,7 +771,10 @@ private void OnMemoryFlyoutClosed(object sender, object args)

private void SetChildAsMemory()
{
DockMemoryHolder.Child = GetMemory();
if (DockMemoryHolder.Child != GetMemory())
{
DockMemoryHolder.Child = GetMemory();
}
}

private void SetChildAsHistory()
Expand All @@ -782,7 +784,10 @@ private void SetChildAsHistory()
InitializeHistoryView(Model.HistoryVM);
}

DockHistoryHolder.Child = m_historyList;
if (DockHistoryHolder.Child != m_historyList)
{
DockHistoryHolder.Child = m_historyList;
}
}

private Memory GetMemory()
Expand Down

0 comments on commit 1bc539f

Please sign in to comment.