Skip to content

Commit

Permalink
Fix stack overflow on grabbing Dispatcher from ChildView
Browse files Browse the repository at this point in the history
  • Loading branch information
neilsarkar committed Jul 30, 2020
1 parent d2c1377 commit 9391e69
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Runtime/Navigation/VioletButton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace VioletUI {
public class VioletButton : UnityEngine.UI.Button {
public ScreenId visitScreen;

Navigator navigator;
protected Navigator navigator;
protected override void Awake() {
base.Awake();
navigator = gameObject.GetComponentInParent<Navigator>();
Expand Down
4 changes: 2 additions & 2 deletions Runtime/StateMonoBehaviour.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ public class View : View<TState> {
public abstract class RepeatView<T> : RepeatView<TState, T> {
protected override TState State => Singleton?.State;
protected override TState LastState => Singleton?.LastState;
protected override Dispatcher<TState> Dispatcher => Dispatcher;
protected override Dispatcher<TState> Dispatcher => Singleton?.Dispatcher;
}

public abstract class ChildView<T> : ChildView<TState, T> {
protected override TState State => Singleton?.State;
protected override TState LastState => Singleton?.LastState;
protected override Dispatcher<TState> Dispatcher => Dispatcher;
protected override Dispatcher<TState> Dispatcher => Singleton?.Dispatcher;
}

void Awake() {
Expand Down

0 comments on commit 9391e69

Please sign in to comment.