From 472575e20d9607fe37372e07fb01ba1dc57a2db6 Mon Sep 17 00:00:00 2001 From: CodeDoctorDE Date: Mon, 12 Feb 2024 21:47:13 +0100 Subject: [PATCH] Add new issue links --- .github/ISSUE_TEMPLATE/config.yml | 6 ++++++ SECURITY.md | 2 +- app/lib/renderers/renderer.dart | 28 ++++++++++++++-------------- 3 files changed, 21 insertions(+), 15 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index dc54fd7bff9e..5f68e2857f04 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,5 +1,11 @@ blank_issues_enabled: false contact_links: + - name: Report iOS issue + url: https://github.com/LinwoodDev/Butterfly/issues/244 + about: Please ask and answer questions here. Synced with discord. + - name: Ask a question + url: https://github.com/LinwoodDev/Butterfly/discussions + about: Please ask and answer questions here. Synced with discord. - name: Linwood Matrix url: https://go.linwood.dev/discord about: Please ask and answer questions here. Synced with discord. diff --git a/SECURITY.md b/SECURITY.md index 6648c951b4fa..39f76279d8c5 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -4,7 +4,7 @@ | Version | Supported | | | ------- | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------- | -| 2.0.3-dev | :warning: | [Docs](https://docs.butterfly.linwood.dev/docs/2.1/intro) [Release](https://github.com/LinwoodDev/butterfly/releases/tag/v2.0.3-rc.0) | +| 2.0.3-dev | :warning: | [Docs](https://docs.butterfly.linwood.dev/docs/2.1/intro) [Release](https://github.com/LinwoodDev/butterfly/releases/tag/v2.0.3-rc.1) | | 2.0.2 | :white_check_mark: | [Docs](https://docs.butterfly.linwood.dev/docs/2.0/intro) [Release](https://github.com/LinwoodDev/butterfly/releases/tag/v2.0.2) | | 1.6.1 | :x: | [Docs](https://docs.butterfly.linwood.dev/docs/1.6/intro) [Release](https://github.com/LinwoodDev/butterfly/releases/tag/v1.6.1) | | 1.5.1 | :x: | [Docs](https://docs.butterfly.linwood.dev/docs/1.5/intro) [Release](https://github.com/LinwoodDev/butterfly/releases/tag/v1.5.1) | diff --git a/app/lib/renderers/renderer.dart b/app/lib/renderers/renderer.dart index d43a33be8c75..a55e1f7407c0 100644 --- a/app/lib/renderers/renderer.dart +++ b/app/lib/renderers/renderer.dart @@ -91,24 +91,24 @@ abstract class Renderer { factory Renderer.fromInstance(T element) { // Elements if (element is PadElement) { - return element.map( - pen: (value) => PenRenderer(value), - text: (value) => TextRenderer(value), - image: (value) => ImageRenderer(value), - svg: (value) => SvgRenderer(value), - shape: (value) => ShapeRenderer(value), - markdown: (value) => MarkdownRenderer(value), - texture: (value) => TextureRenderer(value), - ) as Renderer; + return switch (element) { + PenElement() => PenRenderer(element), + TextElement() => TextRenderer(element), + ImageElement() => ImageRenderer(element), + SvgElement() => SvgRenderer(element), + ShapeElement() => ShapeRenderer(element), + MarkdownElement() => MarkdownRenderer(element), + TextureElement() => TextureRenderer(element), + } as Renderer; } // Backgrounds if (element is Background) { - return element.map( - texture: (value) => TextureBackgroundRenderer(value), - image: (value) => ImageBackgroundRenderer(value), - svg: (value) => EmptyBackgroundRenderer(value), - ) as Renderer; + return switch (element) { + TextureBackground() => TextureBackgroundRenderer(element), + ImageBackground() => ImageBackgroundRenderer(element), + SvgBackground() => EmptyBackgroundRenderer(element), + } as Renderer; } if (element is UtilitiesState) {