Skip to content

Commit

Permalink
Merge branch 'project/PH1' into project/PH1-net8
Browse files Browse the repository at this point in the history
# Conflicts:
#	Softeq.XToolkit.Connectivity/ConnectivityService.cs
  • Loading branch information
Pavel Leonenko committed Jul 15, 2024
2 parents eb1be10 + ef82b6d commit eb4f4b0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ protected override void Dispose(bool disposing)
_subscription?.Dispose();
}

private void ReloadMapping()
protected void ReloadMapping()
{
_flatMapping.Clear();

Expand Down
2 changes: 1 addition & 1 deletion Softeq.XToolkit.Common/Commands/IAsyncCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public interface IAsyncCommand : ICommand
/// If the command does not require data to be passed, this object can be set to null.
/// </param>
/// <returns>The Task to execute.</returns>
Task ExecuteAsync(object parameter);
Task ExecuteAsync(object? parameter);
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ public DroidPushNotificationsConsumer(
});
}

~DroidPushNotificationsConsumer()
{
Dispose(false);
}

/// <inheritdoc />
public bool TryHandleNotification(RemoteMessage message)
{
Expand Down Expand Up @@ -101,8 +96,10 @@ public Task OnUnregisterFromPushNotifications()

public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
Execute.BeginOnUIThread(() =>
{
ProcessLifecycleOwner.Get().Lifecycle.RemoveObserver(_lifecycleObserver);
});
}

private void OnMessageReceivedInternal(PushNotificationModel parsedNotification, bool inForeground)
Expand All @@ -116,16 +113,5 @@ private void OnMessageReceivedInternal(PushNotificationModel parsedNotification,
_pushNotificationsHandler.HandlePushNotificationReceived(parsedNotification, inForeground);
}
}

private void Dispose(bool isDisposing)
{
if (isDisposing)
{
Execute.BeginOnUIThread(() =>
{
ProcessLifecycleOwner.Get().Lifecycle.RemoveObserver(_lifecycleObserver);
});
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,21 +49,7 @@ public string? Extension

public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}

~ImagePickerResult()
{
Dispose(false);
}

protected void Dispose(bool disposing)
{
if (disposing)
{
ImageObject?.Dispose();
}
ImageObject?.Dispose();
}

/// <summary>
Expand Down

0 comments on commit eb4f4b0

Please sign in to comment.