Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project/ph1 net8 merge #555

Merged
merged 3 commits into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading