From 343442a7014063026d69a78c1f0c8c9ca113d6dd Mon Sep 17 00:00:00 2001 From: Soneliem <24221762+Soneliem@users.noreply.github.com> Date: Thu, 25 Nov 2021 11:34:15 +1030 Subject: [PATCH] Add sponsors and more checks --- .github/workflows/codeql-analysis.yml | 44 -------------------- .github/workflows/sponsors.yml | 26 ++++++++++++ README.md | 4 ++ WAIUA/Commands/Main.cs | 32 +++++++-------- WAIUA/VersionInfo.xml | 2 +- WAIUA/Views/Info.xaml | 58 +++++++++++++-------------- WAIUA/WAIUA.csproj | 6 +-- 7 files changed, 76 insertions(+), 96 deletions(-) delete mode 100644 .github/workflows/codeql-analysis.yml create mode 100644 .github/workflows/sponsors.yml diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml deleted file mode 100644 index cc837bf..0000000 --- a/.github/workflows/codeql-analysis.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: "CodeQL" - -on: - push: - branches: [main] - paths: - - '**.cs' - - '**.csproj' - pull_request: - branches: [main] - paths: - - '**.cs' - - '**.csproj' - -jobs: - analyze: - - name: analyze - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - language: ['csharp'] - - steps: - - name: Checkout repository - uses: actions/checkout@v2 - with: - fetch-depth: 2 - - - run: git checkout HEAD^2 - if: ${{ github.event_name == 'pull_request' }} - - - name: Initialize CodeQL - uses: github/codeql-action/init@v1 - with: - languages: ${{ matrix.language }} - - - name: Autobuild - uses: github/codeql-action/autobuild@v1 - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 diff --git a/.github/workflows/sponsors.yml b/.github/workflows/sponsors.yml new file mode 100644 index 0000000..f32b9b3 --- /dev/null +++ b/.github/workflows/sponsors.yml @@ -0,0 +1,26 @@ +name: Generate Sponsors README + +on: + push: + branches: + - main + workflow_dispatch: + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout 🛎️ + uses: actions/checkout@v2 + + - name: Generate Sponsors 💖 + uses: JamesIves/github-sponsors-readme-action@1.0.5 + with: + token: ${{ secrets.SECRETS }} + file: 'README.md' + + - name: Deploy to GitHub Pages 🚀 + uses: JamesIves/github-pages-deploy-action@4.1.1 + with: + branch: main + folder: '.' diff --git a/README.md b/README.md index eb2a400..b63fc3e 100644 --- a/README.md +++ b/README.md @@ -113,6 +113,10 @@ Another reason to making this was that I wanted some experience with .NET and GU I welcome any sort of contribution and am happy to take in any ~~hate/~~ feedback. Open source means open heart :) Also applogies for the code. In the near future I will definitely change the code to something that doesn't break every coding convention. +## Sponsors +This project is sponsored by: + +Thank you for your support! Any donation of $5 and over will addionally get you into the app's main page. ## Translations WAIUA Supports full localization and instructions to help with translations can be found in [Localization](https://github.com/Soneliem/WAIUA/blob/master/Localization.md) diff --git a/WAIUA/Commands/Main.cs b/WAIUA/Commands/Main.cs index 068f907..e0aac5e 100644 --- a/WAIUA/Commands/Main.cs +++ b/WAIUA/Commands/Main.cs @@ -73,7 +73,7 @@ public class Main // return tsk.Result; //} - private static string DoCachedRequest(Method method, string url, bool addRiotAuth, bool bypassCache = false) + private static string DoCachedRequest(Method method, string url, bool addRiotAuth, bool bypassCache = false) { var attemptCache = method == Method.GET && !bypassCache; if (attemptCache) @@ -258,7 +258,7 @@ public static string GetIGUsername(string puuid) } catch (Exception) { - IGN = null; + // ignored } return IGN; @@ -467,8 +467,6 @@ private static void GetAgentInfo(string agent, sbyte playerno) { // ignored } - - } } @@ -487,6 +485,7 @@ private static void GetCardInfo(string card, sbyte playerno) } catch (Exception) { + // ignored } } @@ -494,6 +493,10 @@ private static void GetSkinInfo(sbyte playerno) { try { + VandalList[playerno] = null; + VandalNameList[playerno] = null; + PhantomList[playerno] = null; + PhantomNameList[playerno] = null; if (!string.IsNullOrEmpty(PUUIDList[playerno])) { var response = DoCachedRequest(Method.GET, @@ -524,16 +527,10 @@ private static void GetSkinInfo(sbyte playerno) if (phantomchroma == "52221ba2-4e4c-ec76-8c81-3483506d5242") PhantomList[playerno] = "/Assets/phantom.png"; } - else - { - VandalList[playerno] = null; - VandalNameList[playerno] = null; - PhantomList[playerno] = null; - PhantomNameList[playerno] = null; - } } catch (Exception) { + // ignored } } @@ -553,8 +550,7 @@ private static void GetCompHistory(string puuid, sbyte playerno) if (historyinfoObj["Matches"][0]["RankedRatingEarned"] != null) { - RankProgList[playerno] = - historyinfoObj["Matches"][0]["RankedRatingAfterUpdate"].Value(); + RankProgList[playerno] = historyinfoObj["Matches"][0]["RankedRatingAfterUpdate"].Value(); int pmatch = historyinfoObj["Matches"][0]["RankedRatingEarned"].Value(); PGList[playerno] = pmatch.ToString("+#;-#;0"); if (pmatch > 0) @@ -592,6 +588,7 @@ private static void GetCompHistory(string puuid, sbyte playerno) } catch (Exception) { + // ignored } } @@ -738,6 +735,7 @@ private static void GetSeasons() } catch (Exception) { + // ignored } } @@ -778,6 +776,7 @@ private static bool Tracker(string username, sbyte playerno) var output = false; try { + TrackerUrlList[playerno] = null; if (!string.IsNullOrEmpty(username)) { var encodedUsername = Uri.EscapeDataString(username); @@ -795,13 +794,10 @@ private static bool Tracker(string username, sbyte playerno) output = true; } } - else - { - TrackerUrlList[playerno] = null; - } } catch (Exception) { + // ignored } return output; @@ -825,6 +821,7 @@ private static void GetPresences() } catch (Exception) { + // ignored } } @@ -846,6 +843,7 @@ private static void GetPartyIDs(string puuid, int playerno) } catch (Exception) { + // ignored } } } diff --git a/WAIUA/VersionInfo.xml b/WAIUA/VersionInfo.xml index ac9cd10..b05e2b9 100644 --- a/WAIUA/VersionInfo.xml +++ b/WAIUA/VersionInfo.xml @@ -1,7 +1,7 @@ - 1.4.0.0 + 1.4.0.1 https://github.com/Soneliem/WAIUA/releases/latest/download/WAIUA.exe https://github.com/Soneliem/WAIUA/releases/latest false diff --git a/WAIUA/Views/Info.xaml b/WAIUA/Views/Info.xaml index c10b3df..f0c67e9 100644 --- a/WAIUA/Views/Info.xaml +++ b/WAIUA/Views/Info.xaml @@ -60,17 +60,17 @@ - - - + + + - + - +