Exemple #1
0
 public void Reload()
 {
     try
     {
         var toDoState = CurrentStore.GetState();
         if (toDoState != null)
         {
             _treeView.SetSerializableStateElement(RootId, toDoState.ToSerialize(false));
         }
         _disposable?.Dispose();
         _disposable = CurrentStore.Subscribe(() => {
             var state = CurrentStore.GetState();
             if (state != null)
             {
                 _treeView.SetSerializableStateElement(RootId, state.ToSerialize(false));
             }
         });
     }
     catch (Exception e)
     {
         _treeView = new UniReduxTreeView(_state, _header, NewOpenWindow);
         Debug.LogError(e);
     }
     _treeView.Reload();
 }