From 5bf4f569e4b71e06629a6c219f8d8f52f04565e3 Mon Sep 17 00:00:00 2001
From: syuilo <Syuilotan@yahoo.co.jp>
Date: Wed, 22 Sep 2021 22:45:10 +0900
Subject: [PATCH] =?UTF-8?q?enhance(client):=20=E3=82=A2=E3=83=83=E3=83=97?=
 =?UTF-8?q?=E3=83=87=E3=83=BC=E3=83=88=E3=81=8C=E5=88=A9=E7=94=A8=E5=8F=AF?=
 =?UTF-8?q?=E8=83=BD=E3=81=AA=E5=A0=B4=E5=90=88=E3=82=A8=E3=83=A9=E3=83=BC?=
 =?UTF-8?q?=E8=A1=A8=E7=A4=BA=E3=81=8A=E3=82=88=E3=81=B3=E3=83=80=E3=82=A4?=
 =?UTF-8?q?=E3=82=A2=E3=83=AD=E3=82=B0=E8=A1=A8=E7=A4=BA=E3=81=97=E3=81=AA?=
 =?UTF-8?q?=E3=81=84=E3=82=88=E3=81=86=E3=81=AB?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 CHANGELOG.md           | 1 +
 src/server/web/boot.js | 8 ++------
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9a0e754041..59a0577a2c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -21,6 +21,7 @@
 - UIの改善
 - MFMにsparklesエフェクトを追加
 - 非ログイン自は更新ダイアログを出さないように
+- クライアント起動時、アップデートが利用可能な場合エラー表示およびダイアログ表示しないように
 
 ### Bugfixes
 - アカウントデータのエクスポート/インポート処理ができない問題を修正
diff --git a/src/server/web/boot.js b/src/server/web/boot.js
index a3a0685669..d4a2529e63 100644
--- a/src/server/web/boot.js
+++ b/src/server/web/boot.js
@@ -48,8 +48,8 @@
 		} else if (localeOutdated) {
 			// nop
 		} else {
+			await checkUpdate();
 			renderError('LOCALE_FETCH_FAILED');
-			checkUpdate();
 			return;
 		}
 	}
@@ -65,8 +65,8 @@
 	script.setAttribute('async', 'true');
 	script.setAttribute('defer', 'true');
 	script.addEventListener('error', async () => {
+		await checkUpdate();
 		renderError('APP_FETCH_FAILED');
-		checkUpdate();
 	});
 	document.head.appendChild(script);
 	//#endregion
@@ -142,10 +142,6 @@
 
 		if (meta.version != v) {
 			localStorage.setItem('v', meta.version);
-			alert(
-				'Misskeyの新しいバージョンがあります。ページを再度読み込みします。' +
-				'\n\n' +
-				'New version of Misskey available. The page will be reloaded.');
 			refresh();
 		}
 	}
-- 
GitLab