diff --git a/src/IO.Ably.Shared/Realtime/Presence.cs b/src/IO.Ably.Shared/Realtime/Presence.cs index 5ed2d952e..68784ae69 100644 --- a/src/IO.Ably.Shared/Realtime/Presence.cs +++ b/src/IO.Ably.Shared/Realtime/Presence.cs @@ -43,18 +43,24 @@ internal Presence(IConnectionManager connection, RealtimeChannel channel, string /// /// [Obsolete("This property is deprecated, use SyncComplete instead")] - public bool IsSyncComplete => SyncComplete; // RTP13 + public bool IsSyncComplete => SyncComplete; // RTP13. /// /// Checks if presence sync has ended. /// /// - public bool SyncComplete => MembersMap.SyncCompleted && !IsSyncInProgress; // RTP13 + public bool SyncComplete => MembersMap.SyncCompleted && !SyncInProgress; // RTP13 /// /// Indicates whether there is currently a sync in progress. /// - internal bool IsSyncInProgress => MembersMap.SyncInProgress; + [Obsolete("This property is internal, will be removed in the future")] + public bool IsSyncInProgress => SyncInProgress; + + /// + /// Indicates whether there is currently a sync in progress. + /// + internal bool SyncInProgress => MembersMap.SyncInProgress; /// /// Indicates all members present on the channel. @@ -540,7 +546,7 @@ internal void OnSyncMessage(ProtocolMessage protocolMessage) /* If a new sequence identifier is sent from Ably, then the client library * must consider that to be the start of a new sync sequence * and any previous in-flight sync should be discarded. (part of RTP18)*/ - if (IsSyncInProgress && _currentSyncChannelSerial.IsNotEmpty() && _currentSyncChannelSerial != syncSequenceId) + if (SyncInProgress && _currentSyncChannelSerial.IsNotEmpty() && _currentSyncChannelSerial != syncSequenceId) { EndSync(); } @@ -621,7 +627,7 @@ internal void OnPresence(PresenceMessage[] messages) internal void StartSync() { - if (!IsSyncInProgress) + if (!SyncInProgress) { MembersMap.StartSync(); } @@ -629,7 +635,7 @@ internal void StartSync() private void EndSync() { - if (!IsSyncInProgress) + if (!SyncInProgress) { return; } diff --git a/src/IO.Ably.Tests.Shared/Rest/SandboxSpecExtension.cs b/src/IO.Ably.Tests.Shared/Rest/SandboxSpecExtension.cs index db9a4c3d5..4ba5374af 100644 --- a/src/IO.Ably.Tests.Shared/Rest/SandboxSpecExtension.cs +++ b/src/IO.Ably.Tests.Shared/Rest/SandboxSpecExtension.cs @@ -47,7 +47,7 @@ internal static async Task WaitForAttachedState(this IRealtimeChannel channel, T internal static async Task WaitSync(this Presence presence, TimeSpan? waitSpan = null) { TaskCompletionSource taskCompletionSource = new TaskCompletionSource(); - var inProgress = presence.IsSyncInProgress; + var inProgress = presence.SyncInProgress; if (inProgress == false) { return true;