| | | 1 | | using Chronicis.Client.Services; |
| | | 2 | | using Chronicis.Shared.DTOs; |
| | | 3 | | using Chronicis.Shared.DTOs.Quests; |
| | | 4 | | using Chronicis.Shared.Enums; |
| | | 5 | | using Microsoft.AspNetCore.Components; |
| | | 6 | | using Microsoft.AspNetCore.Components.Web; |
| | | 7 | | using Microsoft.JSInterop; |
| | | 8 | | using MudBlazor; |
| | | 9 | | |
| | | 10 | | namespace Chronicis.Client.Components.Quests; |
| | | 11 | | |
| | | 12 | | public partial class QuestDrawer : IAsyncDisposable |
| | | 13 | | { |
| | 0 | 14 | | [Inject] private IArticleApiService ArticleApi { get; set; } = null!; |
| | | 15 | | |
| | 0 | 16 | | private bool IsOpen { get; set; } |
| | | 17 | | private bool _isLoading; |
| | | 18 | | private bool _isSubmitting; |
| | | 19 | | private bool _loadingUpdates; |
| | | 20 | | private string? _emptyStateMessage; |
| | | 21 | | private string? _loadingError; |
| | | 22 | | private string? _validationError; |
| | | 23 | | |
| | | 24 | | private List<QuestDto>? _quests; |
| | | 25 | | private Guid? _selectedQuestId; |
| | | 26 | | private QuestDto? _selectedQuest; |
| | | 27 | | private List<QuestUpdateEntryDto>? _recentUpdates; |
| | | 28 | | |
| | | 29 | | private Guid? _currentArcId; |
| | | 30 | | private Guid? _currentSessionId; |
| | | 31 | | private Guid? _currentWorldId; |
| | | 32 | | private bool _canAssociateSession; |
| | 0 | 33 | | private bool _associateWithSession = true; |
| | | 34 | | |
| | | 35 | | private IJSObjectReference? _editorModule; |
| | | 36 | | private bool _editorInitialized; |
| | | 37 | | private DotNetObjectReference<QuestDrawer>? _dotNetRef; |
| | | 38 | | private bool _disposed; |
| | | 39 | | private bool _questsLoadedForArc; |
| | | 40 | | private bool _needsEditorInit; // Flag to trigger editor init after render |
| | | 41 | | |
| | | 42 | | protected override void OnInitialized() |
| | | 43 | | { |
| | 0 | 44 | | QuestDrawerService.OnOpen += HandleOpen; |
| | 0 | 45 | | QuestDrawerService.OnClose += HandleClose; |
| | 0 | 46 | | } |
| | | 47 | | |
| | | 48 | | protected override async Task OnAfterRenderAsync(bool firstRender) |
| | | 49 | | { |
| | | 50 | | // Initialize editor after DOM has been updated |
| | 0 | 51 | | if (_needsEditorInit && !_editorInitialized) |
| | | 52 | | { |
| | 0 | 53 | | _needsEditorInit = false; |
| | 0 | 54 | | await InitializeEditorAsync(); |
| | | 55 | | } |
| | 0 | 56 | | } |
| | | 57 | | |
| | | 58 | | private async void HandleOpen() |
| | | 59 | | { |
| | 0 | 60 | | IsOpen = true; |
| | 0 | 61 | | await InvokeAsync(async () => |
| | 0 | 62 | | { |
| | 0 | 63 | | await LoadQuestsAsync(); |
| | 0 | 64 | | StateHasChanged(); |
| | 0 | 65 | | |
| | 0 | 66 | | // Focus the first quest selector after render |
| | 0 | 67 | | if (_quests?.Any() == true) |
| | 0 | 68 | | { |
| | 0 | 69 | | await Task.Delay(100); |
| | 0 | 70 | | await FocusFirstQuestAsync(); |
| | 0 | 71 | | } |
| | 0 | 72 | | }); |
| | 0 | 73 | | } |
| | | 74 | | |
| | | 75 | | private async void HandleClose() |
| | | 76 | | { |
| | 0 | 77 | | IsOpen = false; |
| | 0 | 78 | | await InvokeAsync(async () => |
| | 0 | 79 | | { |
| | 0 | 80 | | await DisposeEditorAsync(); |
| | 0 | 81 | | _selectedQuestId = null; |
| | 0 | 82 | | _selectedQuest = null; |
| | 0 | 83 | | _recentUpdates = null; |
| | 0 | 84 | | _validationError = null; |
| | 0 | 85 | | StateHasChanged(); |
| | 0 | 86 | | }); |
| | 0 | 87 | | } |
| | | 88 | | |
| | | 89 | | private async Task CloseDrawer() |
| | | 90 | | { |
| | 0 | 91 | | QuestDrawerService.Close(); |
| | | 92 | | |
| | | 93 | | // Give drawer time to close, then return focus to main content |
| | 0 | 94 | | await Task.Delay(200); |
| | 0 | 95 | | await RestoreFocusAsync(); |
| | 0 | 96 | | } |
| | | 97 | | |
| | | 98 | | private async Task LoadQuestsAsync() |
| | | 99 | | { |
| | 0 | 100 | | _isLoading = true; |
| | 0 | 101 | | _emptyStateMessage = null; |
| | 0 | 102 | | _loadingError = null; |
| | | 103 | | |
| | | 104 | | try |
| | | 105 | | { |
| | | 106 | | // Resolve Arc and Session from current article |
| | 0 | 107 | | var selectedArticle = await GetCurrentArticleAsync(); |
| | | 108 | | |
| | 0 | 109 | | if (selectedArticle == null) |
| | | 110 | | { |
| | 0 | 111 | | _emptyStateMessage = "No article selected. Navigate to a session to use quest tracking."; |
| | 0 | 112 | | return; |
| | | 113 | | } |
| | | 114 | | |
| | | 115 | | // Store the world ID for autocomplete |
| | 0 | 116 | | _currentWorldId = selectedArticle.WorldId; |
| | | 117 | | |
| | | 118 | | // Check if we're on a Session or SessionNote page |
| | 0 | 119 | | if (selectedArticle.Type != ArticleType.Session && selectedArticle.Type != ArticleType.SessionNote) |
| | | 120 | | { |
| | 0 | 121 | | _emptyStateMessage = "Navigate to a session or session note to use quest tracking."; |
| | 0 | 122 | | return; |
| | | 123 | | } |
| | | 124 | | |
| | 0 | 125 | | _currentArcId = selectedArticle.ArcId; |
| | | 126 | | |
| | 0 | 127 | | if (!_currentArcId.HasValue) |
| | | 128 | | { |
| | 0 | 129 | | _emptyStateMessage = "This session is not associated with an arc."; |
| | 0 | 130 | | return; |
| | | 131 | | } |
| | | 132 | | |
| | | 133 | | // Resolve SessionId |
| | 0 | 134 | | if (selectedArticle.Type == ArticleType.Session) |
| | | 135 | | { |
| | 0 | 136 | | _currentSessionId = selectedArticle.Id; |
| | 0 | 137 | | _canAssociateSession = true; |
| | | 138 | | } |
| | 0 | 139 | | else if (selectedArticle.Type == ArticleType.SessionNote) |
| | | 140 | | { |
| | 0 | 141 | | _currentSessionId = await ResolveSessionIdFromParentAsync(selectedArticle.Id); |
| | 0 | 142 | | _canAssociateSession = _currentSessionId.HasValue; |
| | | 143 | | } |
| | | 144 | | |
| | | 145 | | // Only load quests if we haven't already loaded for this arc (prevent duplicate fetches) |
| | 0 | 146 | | if (!_questsLoadedForArc) |
| | | 147 | | { |
| | 0 | 148 | | _quests = await QuestApi.GetArcQuestsAsync(_currentArcId.Value); |
| | 0 | 149 | | _questsLoadedForArc = true; |
| | | 150 | | } |
| | | 151 | | |
| | | 152 | | // Auto-select first quest if available and none selected |
| | 0 | 153 | | if (_quests?.Any() == true && !_selectedQuestId.HasValue) |
| | | 154 | | { |
| | 0 | 155 | | await SelectQuest(_quests.First().Id); |
| | | 156 | | } |
| | 0 | 157 | | } |
| | 0 | 158 | | catch (Exception ex) |
| | | 159 | | { |
| | 0 | 160 | | Logger.LogError(ex, "Failed to load quests"); |
| | 0 | 161 | | _loadingError = ex.Message; |
| | 0 | 162 | | _quests = null; |
| | 0 | 163 | | } |
| | | 164 | | finally |
| | | 165 | | { |
| | 0 | 166 | | _isLoading = false; |
| | | 167 | | } |
| | 0 | 168 | | } |
| | | 169 | | |
| | | 170 | | private async Task<ArticleDto?> GetCurrentArticleAsync() |
| | | 171 | | { |
| | 0 | 172 | | var selectedNodeId = TreeState.SelectedNodeId; |
| | | 173 | | |
| | 0 | 174 | | if (!selectedNodeId.HasValue) |
| | 0 | 175 | | return null; |
| | | 176 | | |
| | | 177 | | try |
| | | 178 | | { |
| | 0 | 179 | | return await ArticleApi.GetArticleDetailAsync(selectedNodeId.Value); |
| | | 180 | | } |
| | 0 | 181 | | catch |
| | | 182 | | { |
| | 0 | 183 | | return null; |
| | | 184 | | } |
| | 0 | 185 | | } |
| | | 186 | | |
| | | 187 | | private async Task<Guid?> ResolveSessionIdFromParentAsync(Guid articleId) |
| | | 188 | | { |
| | | 189 | | try |
| | | 190 | | { |
| | 0 | 191 | | var article = await ArticleApi.GetArticleDetailAsync(articleId); |
| | | 192 | | |
| | 0 | 193 | | while (article != null) |
| | | 194 | | { |
| | 0 | 195 | | if (article.Type == ArticleType.Session) |
| | 0 | 196 | | return article.Id; |
| | | 197 | | |
| | 0 | 198 | | if (!article.ParentId.HasValue) |
| | | 199 | | break; |
| | | 200 | | |
| | 0 | 201 | | article = await ArticleApi.GetArticleDetailAsync(article.ParentId.Value); |
| | | 202 | | } |
| | 0 | 203 | | } |
| | 0 | 204 | | catch (Exception ex) |
| | | 205 | | { |
| | 0 | 206 | | Logger.LogError(ex, "Failed to resolve session ID"); |
| | 0 | 207 | | } |
| | | 208 | | |
| | 0 | 209 | | return null; |
| | 0 | 210 | | } |
| | | 211 | | |
| | | 212 | | private async Task SelectQuest(Guid questId) |
| | | 213 | | { |
| | 0 | 214 | | if (_selectedQuestId == questId) |
| | 0 | 215 | | return; |
| | | 216 | | |
| | | 217 | | // Dispose old editor if switching quests |
| | 0 | 218 | | if (_editorInitialized) |
| | | 219 | | { |
| | 0 | 220 | | await DisposeEditorAsync(); |
| | | 221 | | } |
| | | 222 | | |
| | 0 | 223 | | _selectedQuestId = questId; |
| | 0 | 224 | | _selectedQuest = _quests?.FirstOrDefault(q => q.Id == questId); |
| | 0 | 225 | | _validationError = null; |
| | | 226 | | |
| | 0 | 227 | | if (_selectedQuest != null) |
| | | 228 | | { |
| | | 229 | | // Load recent updates |
| | 0 | 230 | | await LoadRecentUpdatesAsync(questId); |
| | | 231 | | |
| | | 232 | | // Set flag to initialize editor after next render |
| | 0 | 233 | | _needsEditorInit = true; |
| | | 234 | | } |
| | | 235 | | |
| | | 236 | | // Trigger render - OnAfterRenderAsync will handle editor init |
| | 0 | 237 | | StateHasChanged(); |
| | 0 | 238 | | } |
| | | 239 | | |
| | | 240 | | private async Task HandleQuestItemKeyDown(KeyboardEventArgs e, Guid questId) |
| | | 241 | | { |
| | 0 | 242 | | if (e.Key == "Enter" || e.Key == " ") |
| | | 243 | | { |
| | 0 | 244 | | await SelectQuest(questId); |
| | | 245 | | } |
| | 0 | 246 | | } |
| | | 247 | | |
| | | 248 | | private async Task LoadRecentUpdatesAsync(Guid questId) |
| | | 249 | | { |
| | 0 | 250 | | _loadingUpdates = true; |
| | 0 | 251 | | StateHasChanged(); |
| | | 252 | | |
| | | 253 | | try |
| | | 254 | | { |
| | 0 | 255 | | var result = await QuestApi.GetQuestUpdatesAsync(questId, skip: 0, take: 5); |
| | 0 | 256 | | _recentUpdates = result.Items; |
| | 0 | 257 | | } |
| | 0 | 258 | | catch (Exception ex) |
| | | 259 | | { |
| | 0 | 260 | | Logger.LogError(ex, "Failed to load quest updates"); |
| | 0 | 261 | | _recentUpdates = new List<QuestUpdateEntryDto>(); |
| | 0 | 262 | | } |
| | | 263 | | finally |
| | | 264 | | { |
| | 0 | 265 | | _loadingUpdates = false; |
| | 0 | 266 | | StateHasChanged(); |
| | | 267 | | } |
| | 0 | 268 | | } |
| | | 269 | | |
| | | 270 | | private async Task InitializeEditorAsync() |
| | | 271 | | { |
| | 0 | 272 | | if (_editorInitialized || _disposed) |
| | 0 | 273 | | return; |
| | | 274 | | |
| | | 275 | | try |
| | | 276 | | { |
| | 0 | 277 | | _dotNetRef = DotNetObjectReference.Create(this); |
| | 0 | 278 | | _editorModule = await JSRuntime.InvokeAsync<IJSObjectReference>( |
| | 0 | 279 | | "import", "./js/questEditor.js"); |
| | | 280 | | |
| | 0 | 281 | | await _editorModule.InvokeVoidAsync("initializeEditor", "quest-update-editor", _dotNetRef); |
| | 0 | 282 | | _editorInitialized = true; |
| | | 283 | | |
| | | 284 | | // Focus the editor after initialization |
| | 0 | 285 | | await Task.Delay(50); |
| | 0 | 286 | | await FocusEditorAsync(); |
| | 0 | 287 | | } |
| | 0 | 288 | | catch (Exception ex) |
| | | 289 | | { |
| | 0 | 290 | | Logger.LogError(ex, "Failed to initialize quest editor"); |
| | 0 | 291 | | Snackbar.Add("Failed to initialize editor", Severity.Warning); |
| | 0 | 292 | | } |
| | 0 | 293 | | } |
| | | 294 | | |
| | | 295 | | private async Task DisposeEditorAsync() |
| | | 296 | | { |
| | 0 | 297 | | if (!_editorInitialized || _disposed) |
| | 0 | 298 | | return; |
| | | 299 | | |
| | | 300 | | try |
| | | 301 | | { |
| | 0 | 302 | | if (_editorModule != null) |
| | | 303 | | { |
| | 0 | 304 | | await _editorModule.InvokeVoidAsync("destroyEditor"); |
| | | 305 | | } |
| | 0 | 306 | | } |
| | 0 | 307 | | catch (Exception ex) |
| | | 308 | | { |
| | 0 | 309 | | Logger.LogError(ex, "Error disposing quest editor"); |
| | 0 | 310 | | } |
| | | 311 | | finally |
| | | 312 | | { |
| | 0 | 313 | | _editorInitialized = false; |
| | | 314 | | } |
| | 0 | 315 | | } |
| | | 316 | | |
| | | 317 | | private async Task SubmitUpdate() |
| | | 318 | | { |
| | 0 | 319 | | if (_selectedQuest == null || _isSubmitting) |
| | 0 | 320 | | return; |
| | | 321 | | |
| | 0 | 322 | | _isSubmitting = true; |
| | 0 | 323 | | _validationError = null; |
| | | 324 | | |
| | | 325 | | try |
| | | 326 | | { |
| | | 327 | | // Get editor content |
| | 0 | 328 | | if (_editorModule == null) |
| | | 329 | | { |
| | 0 | 330 | | _validationError = "Editor not initialized"; |
| | 0 | 331 | | return; |
| | | 332 | | } |
| | | 333 | | |
| | 0 | 334 | | var content = await _editorModule.InvokeAsync<string>("getEditorContent"); |
| | | 335 | | |
| | | 336 | | // Validate content is not empty or whitespace |
| | 0 | 337 | | if (string.IsNullOrWhiteSpace(content) || content == "<p></p>" || content == "<p><br></p>") |
| | | 338 | | { |
| | 0 | 339 | | _validationError = "Update content cannot be empty"; |
| | 0 | 340 | | return; |
| | | 341 | | } |
| | | 342 | | |
| | | 343 | | // Create update DTO |
| | 0 | 344 | | var createDto = new QuestUpdateCreateDto |
| | 0 | 345 | | { |
| | 0 | 346 | | Body = content, |
| | 0 | 347 | | SessionId = _associateWithSession && _canAssociateSession ? _currentSessionId : null |
| | 0 | 348 | | }; |
| | | 349 | | |
| | | 350 | | // Submit via API |
| | 0 | 351 | | var result = await QuestApi.AddQuestUpdateAsync(_selectedQuest.Id, createDto); |
| | | 352 | | |
| | 0 | 353 | | if (result != null) |
| | | 354 | | { |
| | | 355 | | // Clear editor |
| | 0 | 356 | | await _editorModule.InvokeVoidAsync("clearEditor"); |
| | | 357 | | |
| | | 358 | | // Refresh updates list |
| | 0 | 359 | | await LoadRecentUpdatesAsync(_selectedQuest.Id); |
| | | 360 | | |
| | | 361 | | // Update the quest's UpdatedAt (refresh from server if needed) |
| | 0 | 362 | | var refreshedQuest = await QuestApi.GetQuestAsync(_selectedQuest.Id); |
| | 0 | 363 | | if (refreshedQuest != null) |
| | | 364 | | { |
| | 0 | 365 | | var questInList = _quests?.FirstOrDefault(q => q.Id == _selectedQuest.Id); |
| | 0 | 366 | | if (questInList != null) |
| | | 367 | | { |
| | 0 | 368 | | questInList.UpdatedAt = refreshedQuest.UpdatedAt; |
| | 0 | 369 | | questInList.UpdateCount = refreshedQuest.UpdateCount; |
| | | 370 | | } |
| | | 371 | | |
| | 0 | 372 | | _selectedQuest = refreshedQuest; |
| | | 373 | | } |
| | | 374 | | |
| | 0 | 375 | | Snackbar.Add("Quest update added", Severity.Success); |
| | | 376 | | } |
| | | 377 | | else |
| | | 378 | | { |
| | 0 | 379 | | _validationError = "Failed to add quest update"; |
| | | 380 | | } |
| | 0 | 381 | | } |
| | 0 | 382 | | catch (Exception ex) |
| | | 383 | | { |
| | 0 | 384 | | Logger.LogError(ex, "Failed to submit quest update"); |
| | 0 | 385 | | _validationError = $"Error: {ex.Message}"; |
| | 0 | 386 | | } |
| | | 387 | | finally |
| | | 388 | | { |
| | 0 | 389 | | _isSubmitting = false; |
| | 0 | 390 | | StateHasChanged(); |
| | | 391 | | } |
| | 0 | 392 | | } |
| | | 393 | | |
| | | 394 | | private async Task FocusFirstQuestAsync() |
| | | 395 | | { |
| | | 396 | | try |
| | | 397 | | { |
| | 0 | 398 | | await JSRuntime.InvokeVoidAsync("eval", |
| | 0 | 399 | | "document.querySelector('.quest-item')?.focus()"); |
| | 0 | 400 | | } |
| | 0 | 401 | | catch |
| | | 402 | | { |
| | | 403 | | // Ignore focus errors |
| | 0 | 404 | | } |
| | 0 | 405 | | } |
| | | 406 | | |
| | | 407 | | private async Task FocusEditorAsync() |
| | | 408 | | { |
| | | 409 | | try |
| | | 410 | | { |
| | 0 | 411 | | if (_editorModule != null) |
| | | 412 | | { |
| | 0 | 413 | | await _editorModule.InvokeVoidAsync("focusEditor"); |
| | | 414 | | } |
| | 0 | 415 | | } |
| | 0 | 416 | | catch |
| | | 417 | | { |
| | | 418 | | // Ignore focus errors |
| | 0 | 419 | | } |
| | 0 | 420 | | } |
| | | 421 | | |
| | | 422 | | private async Task RestoreFocusAsync() |
| | | 423 | | { |
| | | 424 | | try |
| | | 425 | | { |
| | 0 | 426 | | await JSRuntime.InvokeVoidAsync("eval", |
| | 0 | 427 | | "document.querySelector('.chronicis-article-card')?.focus() || document.querySelector('main')?.focus()") |
| | 0 | 428 | | } |
| | 0 | 429 | | catch |
| | | 430 | | { |
| | | 431 | | // Ignore focus errors |
| | 0 | 432 | | } |
| | 0 | 433 | | } |
| | | 434 | | |
| | | 435 | | #region Wiki Link Autocomplete |
| | | 436 | | |
| | | 437 | | [JSInvokable] |
| | | 438 | | public async Task OnAutocompleteTriggered(string query, double x, double y) |
| | | 439 | | { |
| | 0 | 440 | | await AutocompleteService.ShowAsync(query, x, y, _currentWorldId); |
| | 0 | 441 | | } |
| | | 442 | | |
| | | 443 | | [JSInvokable] |
| | | 444 | | public Task OnAutocompleteHidden() |
| | | 445 | | { |
| | 0 | 446 | | AutocompleteService.Hide(); |
| | 0 | 447 | | return Task.CompletedTask; |
| | | 448 | | } |
| | | 449 | | |
| | | 450 | | [JSInvokable] |
| | | 451 | | public Task OnAutocompleteArrowDown() |
| | | 452 | | { |
| | 0 | 453 | | AutocompleteService.SelectNext(); |
| | 0 | 454 | | return Task.CompletedTask; |
| | | 455 | | } |
| | | 456 | | |
| | | 457 | | [JSInvokable] |
| | | 458 | | public Task OnAutocompleteArrowUp() |
| | | 459 | | { |
| | 0 | 460 | | AutocompleteService.SelectPrevious(); |
| | 0 | 461 | | return Task.CompletedTask; |
| | | 462 | | } |
| | | 463 | | |
| | | 464 | | [JSInvokable] |
| | | 465 | | public async Task OnAutocompleteEnter() |
| | | 466 | | { |
| | 0 | 467 | | var selected = AutocompleteService.GetSelectedSuggestion(); |
| | 0 | 468 | | if (selected != null) |
| | | 469 | | { |
| | 0 | 470 | | await HandleAutocompleteSuggestionSelected(selected); |
| | | 471 | | } |
| | 0 | 472 | | } |
| | | 473 | | |
| | | 474 | | private async Task HandleAutocompleteSuggestionSelected(WikiLinkAutocompleteItem suggestion) |
| | | 475 | | { |
| | 0 | 476 | | if (_editorModule == null) |
| | 0 | 477 | | return; |
| | | 478 | | |
| | | 479 | | try |
| | | 480 | | { |
| | 0 | 481 | | if (suggestion.IsExternal) |
| | | 482 | | { |
| | | 483 | | // Insert external link: [[srd/spell-name]] |
| | 0 | 484 | | var linkText = $"{AutocompleteService.ExternalSourceKey}/{suggestion.ExternalKey}"; |
| | 0 | 485 | | await _editorModule.InvokeVoidAsync("insertWikiLink", linkText, suggestion.DisplayText); |
| | | 486 | | } |
| | | 487 | | else |
| | | 488 | | { |
| | | 489 | | // Insert internal article link: [[article-title]] |
| | 0 | 490 | | await _editorModule.InvokeVoidAsync("insertWikiLink", suggestion.DisplayText, null); |
| | | 491 | | } |
| | | 492 | | |
| | | 493 | | // Hide autocomplete |
| | 0 | 494 | | AutocompleteService.Hide(); |
| | 0 | 495 | | } |
| | 0 | 496 | | catch (Exception ex) |
| | | 497 | | { |
| | 0 | 498 | | Logger.LogError(ex, "Failed to insert wiki link suggestion"); |
| | 0 | 499 | | } |
| | 0 | 500 | | } |
| | | 501 | | |
| | | 502 | | #endregion |
| | | 503 | | |
| | | 504 | | public async ValueTask DisposeAsync() |
| | | 505 | | { |
| | 0 | 506 | | if (_disposed) |
| | 0 | 507 | | return; |
| | | 508 | | |
| | 0 | 509 | | _disposed = true; |
| | | 510 | | |
| | 0 | 511 | | QuestDrawerService.OnOpen -= HandleOpen; |
| | 0 | 512 | | QuestDrawerService.OnClose -= HandleClose; |
| | | 513 | | |
| | | 514 | | // Properly dispose TipTap editor |
| | 0 | 515 | | await DisposeEditorAsync(); |
| | | 516 | | |
| | 0 | 517 | | _dotNetRef?.Dispose(); |
| | | 518 | | |
| | 0 | 519 | | if (_editorModule != null) |
| | | 520 | | { |
| | 0 | 521 | | await _editorModule.DisposeAsync(); |
| | | 522 | | } |
| | | 523 | | |
| | 0 | 524 | | GC.SuppressFinalize(this); |
| | 0 | 525 | | } |
| | | 526 | | } |