mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-22 19:35:10 +01:00
fix(frontend): クライアント上での時間ベースの実績獲得動作が実績獲得後も発動している問題を修正 (#14717)
* Check if time-based achievements are unlocked before initializing them in main-boot (cherry picked from commit c0702fd92f70782005517c0065048ececa1ef287) * Update Changelog --------- Co-authored-by: Evan Paterakis <evan@geopjr.dev>
This commit is contained in:
parent
a594d9f26b
commit
d2f1d45ea3
2 changed files with 19 additions and 11 deletions
|
@ -21,6 +21,8 @@
|
|||
### Client
|
||||
- Enhance: デザインの調整
|
||||
- Enhance: ログイン画面の認証フローを改善
|
||||
- Fix: クライアント上での時間ベースの実績獲得動作が実績獲得後も発動していた問題を修正
|
||||
(Cherry-picked from https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/657)
|
||||
|
||||
### Server
|
||||
- Enhance: セキュリティ向上のため、ログイン時にメール通知を行うように
|
||||
|
|
|
@ -230,19 +230,25 @@ export async function mainBoot() {
|
|||
claimAchievement('collectAchievements30');
|
||||
}
|
||||
|
||||
window.setInterval(() => {
|
||||
if (Math.floor(Math.random() * 20000) === 0) {
|
||||
claimAchievement('justPlainLucky');
|
||||
}
|
||||
}, 1000 * 10);
|
||||
if (!claimedAchievements.includes('justPlainLucky')) {
|
||||
window.setInterval(() => {
|
||||
if (Math.floor(Math.random() * 20000) === 0) {
|
||||
claimAchievement('justPlainLucky');
|
||||
}
|
||||
}, 1000 * 10);
|
||||
}
|
||||
|
||||
window.setTimeout(() => {
|
||||
claimAchievement('client30min');
|
||||
}, 1000 * 60 * 30);
|
||||
if (!claimedAchievements.includes('client30min')) {
|
||||
window.setTimeout(() => {
|
||||
claimAchievement('client30min');
|
||||
}, 1000 * 60 * 30);
|
||||
}
|
||||
|
||||
window.setTimeout(() => {
|
||||
claimAchievement('client60min');
|
||||
}, 1000 * 60 * 60);
|
||||
if (!claimedAchievements.includes('client60min')) {
|
||||
window.setTimeout(() => {
|
||||
claimAchievement('client60min');
|
||||
}, 1000 * 60 * 60);
|
||||
}
|
||||
|
||||
// 邪魔
|
||||
//const lastUsed = miLocalStorage.getItem('lastUsed');
|
||||
|
|
Loading…
Reference in a new issue