private IDisposable BindExplorer() { Model.ExplorerModel = ExplorerModel.Hidden(); return(SubscribeToTarget(target => { _explorerActivator.Deactivate(ref _explorerController); var model = _explorerActivator.Activate(target, ref _explorerController); Model.ExplorerModel = model; })); }
public static IDisposable BindExplorer(this MessengerModel model) { model.ExplorerModel = ExplorerModel.Hidden(); return(model.SubscribeToSelection(entry => { switch (entry) { case ChatEntryModel chatEntryModel: model.ExplorerModel = new ExplorerModel(chatEntryModel.Chat); break; case AggregateEntryModel aggregateEntryModel: //model.ExplorerModel = new ExplorerModel(aggregateEntryModel.Aggregate); break; case HomeEntryModel _: model.ExplorerModel = ExplorerModel.Hidden(); break; } })); }