Skip to content

Commit

Permalink
1.2.3
Browse files Browse the repository at this point in the history
### **Changelog**
- Fixed the update button from freezing the application
- Decreased binary/application sizes
- Updated dependencies

### **Checksums**
```
Linux SHA256: 2f9600263fd980819701d94d2e6fc32b2457fb1d6ff6cbb02618cc7b46d42633
Windows SHA256: 1cce931dd372994a16abec26fd02ae67b2038cda44a56fcbe0ff556a57e2d536
```

**Full Changelog**: v1.2.1...v1.2.3
  • Loading branch information
Zephira58 committed Sep 18, 2022
1 parent 78794c5 commit 35498b1
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 53 deletions.
6 changes: 0 additions & 6 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
---
name: Issue
about: Create a report to help us improve
assignees: 'Xanthus58'
---

**Note: for support questions, please use stackoverflow**. This repository's issues are reserved for feature requests and bug reports.

* **I'm submitting a ...**
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Auto-Release

on:
push:
branches: [ "release" ]

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: manoadamro/rust-release@v1
with:
owner: ${{ github.repository_owner }}
repo: ${{ github.repository }}
token: ${{ secrets.GITHUB_TOKEN }}
11 changes: 0 additions & 11 deletions .github/workflows/rust-core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,4 @@ jobs:
override: true
- uses: mbrobbel/rustfmt-check@master
with:
token: ${{ secrets.GITHUB_TOKEN }}

# Makes a new release every time the cargo.yaml file version is updated
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: manoadamro/rust-release@v1
with:
owner: ${{ github.repository_owner }}
repo: ${{ github.repository }}
token: ${{ secrets.GITHUB_TOKEN }}
34 changes: 17 additions & 17 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 10 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "webhook_sender"
version = "1.2.2"
version = "1.2.3"
edition = "2021"
authors = ["Xanthus58 <xanthus58@protonmail.com>"]
license = "MIT"
Expand All @@ -16,4 +16,12 @@ reqwest = { version = "0.11", features = ["blocking", "json"] }
tokio = { version = "1.21.1", features = ["full"] }
egui-notify = "0.4.0"
self_update = "0.32.0"
webhook = "2.1.0"
webhook = "2.1.0"

[profile.release]
# See info here https://www.youtube.com/watch?v=b2qe3L4BX-Y
strip = true
opt-level = "s"
lto = true
codegen-units = 1

16 changes: 5 additions & 11 deletions src/app.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use std::thread;
use std::time::Duration;

use eframe::egui::{self, Color32, Visuals, Window};
Expand Down Expand Up @@ -25,7 +26,6 @@ pub struct MyApp {
embed_thumbnail: String,
embed_field_title: String,
embed_field_value: String,
update_delay: i32,
}

impl Default for MyApp {
Expand All @@ -48,7 +48,6 @@ impl Default for MyApp {
embed_thumbnail: "".to_string(),
embed_field_title: "".to_string(),
embed_field_value: "".to_string(),
update_delay: 0,
}
}
}
Expand Down Expand Up @@ -195,7 +194,7 @@ impl eframe::App for MyApp {
}

if !error{
send_message(&self.message, &self.webhook, &self.username, &self.avatar_url, );
send_message(&self.message, &self.webhook, &self.username, &self.avatar_url);
cb(self.toasts.success("Message Sent!"));
self.message = "".to_string();
}
Expand All @@ -211,14 +210,9 @@ impl eframe::App for MyApp {
if update.clicked() {
cb(self.toasts.info("Updating... See console for logs"));
println!("\nChecking for updates...");
self.update_delay = 5
}
if self.update_delay < 101 && self.update_delay > 2 {
self.update_delay += 1;
}
if self.update_delay == 100 {
download_update().expect("Failed to download update");
self.update_delay = 110;
thread::spawn(move || {
download_update().expect("Failed to download update");
});
}

//UI elements for the embed toggle
Expand Down
12 changes: 6 additions & 6 deletions src/app/api_handler.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![allow(clippy::all)]
#![allow(unused_must_use)]
#![allow(clippy::too_many_arguments)]
use self_update::cargo_crate_version;
use std::collections::HashMap;

Expand All @@ -11,7 +11,7 @@ pub fn get_insult() -> String {
.text()
.expect("Couldn't get response body");
println!("Insult fetched!");
return x;
x
}

pub fn get_affirmation() -> String {
Expand All @@ -20,13 +20,13 @@ pub fn get_affirmation() -> String {
.expect("Get failed")
.text()
.expect("Couldn't get response body")
.replace("{", "")
.replace("}", "")
.replace(":", "")
.replace('{', "")
.replace('}', "")
.replace(':', "")
.replace("affirmation", "")
.replace('"', "");
println!("Affirmation fetched!");
return x;
x
}

use webhook::client::{WebhookClient, WebhookResult};
Expand Down

0 comments on commit 35498b1

Please sign in to comment.