pticostaricags / FairPlaySocial

Multi-platform social network system
GNU General Public License v3.0
21 stars 7 forks source link

Modify the "SharePostModal" to use an interface for Clipboard functionality #121

Open efonsecab opened 1 year ago

efonsecab commented 1 year ago

The "SharePostModal.razor.cs" currently invokes a javscript code in order to copy the post url to the clipboard, in the MAUI App, however, we want to use the native functionality.

Create a shared interface named IClipboardService, in the common project, add a method named CopyEmbeddedPostUrlToClipboardAsync, inject that interface in the SharePostModal component and invoke the method.

Create the custom implementations for Blazor WebAssembly, and MAUI. The Blazor WebAssembly implementation will invoke the javascript function, while the MAUI implementation will use the Clipboard API described here: https://learn.microsoft.com/en-us/dotnet/maui/platform-integration/data/clipboard?view=net-maui-7.0

Add the required permissions to the Android app, if any,