From 19b0d9440617ccf16e09476f3359516a0406bae3 Mon Sep 17 00:00:00 2001 From: Abdullah Atta Date: Fri, 30 Dec 2022 11:39:57 +0500 Subject: [PATCH] sync: add some helpful comments --- Notesnook.API/Controllers/AnnouncementController.cs | 2 +- Notesnook.API/Hubs/SyncHub.cs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Notesnook.API/Controllers/AnnouncementController.cs b/Notesnook.API/Controllers/AnnouncementController.cs index 4fe9057..3c09eb6 100644 --- a/Notesnook.API/Controllers/AnnouncementController.cs +++ b/Notesnook.API/Controllers/AnnouncementController.cs @@ -27,7 +27,7 @@ using Streetwriters.Data.Repositories; namespace Notesnook.API.Controllers { - + // TODO: this should be moved out into its own microservice [ApiController] [Route("announcements")] public class AnnouncementController : ControllerBase diff --git a/Notesnook.API/Hubs/SyncHub.cs b/Notesnook.API/Hubs/SyncHub.cs index 8cbcf84..fc371a6 100644 --- a/Notesnook.API/Hubs/SyncHub.cs +++ b/Notesnook.API/Hubs/SyncHub.cs @@ -92,6 +92,9 @@ namespace Notesnook.API.Hubs var data = transferItem.Items[i]; var type = transferItem.Types[i]; + // We intentionally don't await here to speed up the sync. Fire and forget + // suits here because we don't really care if the item reaches the other + // devices. others.SyncItem( new SyncTransferItem {