diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c9e3882c..1b97b850 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -86,17 +86,17 @@ jobs: - name: Run lint run: npm run lint - - name: Set version - run: npm run replace-version - env: - YAAK_VERSION: ${{ github.ref_name }} - - name: Checkout yaakapp/plugins uses: actions/checkout@v4 with: repository: yaakapp/plugins path: ${{ env.YAAK_PLUGINS_DIR }} + - name: Set version + run: npm run replace-version + env: + YAAK_VERSION: ${{ github.ref_name }} + - uses: tauri-apps/tauri-action@v0 env: YAAK_PLUGINS_DIR: ${{ env.YAAK_PLUGINS_DIR }} diff --git a/src-tauri/src/notifications.rs b/src-tauri/src/notifications.rs index 971010d8..aa938939 100644 --- a/src-tauri/src/notifications.rs +++ b/src-tauri/src/notifications.rs @@ -1,7 +1,7 @@ use std::time::SystemTime; use chrono::{DateTime, Duration, Utc}; -use log::debug; +use log::{debug, info}; use reqwest::Method; use serde::{Deserialize, Serialize}; use tauri::{AppHandle, Manager}; @@ -70,10 +70,11 @@ impl YaakNotifier { ("launches", num_launches.to_string()), ]); let resp = req.send().await.map_err(|e| e.to_string())?; - if resp.status().to_string() != "200" { + if resp.status() != 200 { + debug!("Skipping notification status code {}", resp.status()); return Ok(()); } - + let notification = resp .json::() .await @@ -83,7 +84,7 @@ impl YaakNotifier { .timestamp .signed_duration_since(Utc::now()); let seen = get_kv(app).await?; - if seen.contains(¬ification.id) || (age > Duration::days(1)) { + if seen.contains(¬ification.id) || (age > Duration::days(2)) { debug!("Already seen notification {}", notification.id); return Ok(()); } diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index cf87614b..06d6c7b7 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,6 +1,6 @@ { "productName": "Yaak", - "version": "0.0.0", + "version": "2024.7.0-beta.5", "identifier": "app.yaak.desktop", "build": { "beforeBuildCommand": "npm run build", diff --git a/src-web/hooks/useNotificationToast.tsx b/src-web/hooks/useNotificationToast.tsx index adb240dc..f18ba7c1 100644 --- a/src-web/hooks/useNotificationToast.tsx +++ b/src-web/hooks/useNotificationToast.tsx @@ -20,6 +20,7 @@ export function useNotificationToast() { label: string; }; }>('notification', ({ payload }) => { + console.log('Got notification event', payload); const actionUrl = payload.action?.url; const actionLabel = payload.action?.label; toast.show({