Skip to content

Commit

Permalink
avoid false negatives when app is up-to-date
Browse files Browse the repository at this point in the history
  • Loading branch information
atilafassina committed Jun 18, 2024
1 parent 65c73b7 commit 0191e85
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 18 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pulsar",
"version": "0.1.3",
"version": "0.1.4",
"description": "package dependencies scanner",
"author": {
"name": "@AtilaFassina",
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/Cargo.lock

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

2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pulsar"
version = "0.1.3"
version = "0.1.4"
description = "A Tauri App"
authors = ["@AtilaFassina"]
license = ""
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "../node_modules/@tauri-apps/cli/schema.json",
"productName": "pulsar",
"version": "0.1.3",
"version": "0.1.4",
"identifier": "pulsar.atila.io",
"build": {
"beforeDevCommand": "pnpm dev",
Expand Down
17 changes: 3 additions & 14 deletions src/lib/updater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,8 @@ import { invoke } from "@tauri-apps/api/core";

export async function checkForAppUpdates(onUserClick: false) {
const update = await check();
if (update === null) {
await message(
`
Failed to check for updates.
Please try again later.
`,
{
title: "Error",
kind: "error",
okLabel: "OK",
}
);
return;
} else if (update?.available) {

if (update?.available) {
const yes = await ask(
`
Update to ${update.version} is available!
Expand All @@ -38,6 +26,7 @@ Release notes: ${update.body}
// As an alternative, you could ask the user to restart the app manually
await invoke("graceful_restart");
}
// Support for manual updates.
} else if (onUserClick) {
await message("You are on the latest version.", {
title: "No Update Found",
Expand Down

0 comments on commit 0191e85

Please sign in to comment.