Hello,
You need to modify public async void UpdateNotebookAsync
to public async Task UpdateNotebookAsync
in the 213 row of 'FirebaseService.cs'.
Then you need to modify App.FirebaseService.UpdateNotebookAsync(Notebook.Id, color, Notebook.Name);
to await App.FirebaseService.UpdateNotebookAsync(Notebook.Id, color, Notebook.Name);
in the 33 row of EditNotebookPopUpPageModel.cs
.
After the above, the color of your DataForm will update at real-time.
In general, async methods should use async task as much as possible, and async void is a “pseudo-asynchronous” wrapper. Unless, some background methods called by events cannot use Task directly. Use async void to wrap real async methods.
You can refer to Async/Await - Best Practices in Asynchronous Programming to get more details.
Best Regards,
Alec Liu.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.