Don't check update for beta version

This commit is contained in:
redphx 2024-06-09 11:50:46 +07:00
parent 35e7fdacb5
commit c7734245ae
2 changed files with 6 additions and 1 deletions

View File

@ -1,6 +1,6 @@
import { UserAgent } from "./user-agent";
export const SCRIPT_VERSION = Bun.env.SCRIPT_VERSION;
export const SCRIPT_VERSION = Bun.env.SCRIPT_VERSION!;
export const SCRIPT_HOME = 'https://github.com/redphx/better-xcloud';
export const AppInterface = window.AppInterface;

View File

@ -7,6 +7,11 @@ import { Translations } from "./translation";
* Check for update
*/
export function checkForUpdate() {
// Don't check update for beta version
if (SCRIPT_VERSION.includes('beta')) {
return;
}
const CHECK_INTERVAL_SECONDS = 2 * 3600; // check every 2 hours
const currentVersion = getPref(PrefKey.CURRENT_VERSION);