Skip to content

Commit 17a7da4

Browse files
committed
fix(advisor): don't warn about autolock when using the 30-min default
An unset autolock falls back to a 30-minute default in setAutolock(), but the advisor treated "unset" the same as "disabled" and kept showing the warning. Only warn when autolock is explicitly set to 0. Refs Authenticator-Extension#1281
1 parent 7c2efb3 commit 17a7da4

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/store/Advisor.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ const insightsData: AdvisorInsightInterface[] = [
1919
validation: async () => {
2020
await UserSettings.updateItems();
2121
const hasEncryptedEntry = await EntryStorage.hasEncryptionKey();
22-
return hasEncryptedEntry && !Number(UserSettings.items.autolock);
22+
// an unset autolock falls back to the 30-min default (see setAutolock),
23+
// so only warn when the user has explicitly disabled it with 0 (#1281)
24+
return hasEncryptedEntry && Number(UserSettings.items.autolock) === 0;
2325
},
2426
},
2527
{

0 commit comments

Comments
 (0)