public async Task SelectWorkspaceItem(Guid key, bool isFavorite = false) { if (isFavorite) { await ExecuteFavoriteItemViewModel(key); } else { var prevSelected = Selected; await SetSelected(key); if (prevSelected != default(Guid) && prevSelected != Selected && GetTextEditorText != null) { var content = await GetTextEditorText.Invoke(); await FileSystemRepository.SetFileContent(prevSelected, content); } SelectedChanged?.Invoke(); } }
public async Task SaveTextEditorContent() { var content = await GetTextEditorText.Invoke(); await FileSystemRepository.SetFileContent(Selected, content); }