Refactor ipc to be strongly typed and hide impl details (#1018)

This commit is contained in:
V 2023-05-02 02:50:51 +02:00 committed by GitHub
parent 6a1cb133cd
commit c62d05e1b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 158 additions and 218 deletions

View file

@ -16,7 +16,6 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import IpcEvents from "@utils/IpcEvents";
import { Button } from "@webpack/common";
import { Heart } from "./Heart";
@ -27,9 +26,7 @@ export default function DonateButton(props: any) {
{...props}
look={Button.Looks.LINK}
color={Button.Colors.TRANSPARENT}
onClick={() =>
VencordNative.ipc.invoke(IpcEvents.OPEN_EXTERNAL, "https://github.com/sponsors/Vendicated")
}
onClick={() => VencordNative.native.openExternal("https://github.com/sponsors/Vendicated")}
>
<Heart />
Donate