From a967e2c2fbdabcdacb55b72812bdb264150eeea9 Mon Sep 17 00:00:00 2001 From: SethBurkart123 Date: Thu, 29 Oct 2026 10:38:34 +1100 Subject: [PATCH] fix: only show terms of service popup once signed in to Cloud --- src/seqta/utils/Openers/StartupPopupQueue.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/seqta/utils/Openers/StartupPopupQueue.ts b/src/seqta/utils/Openers/StartupPopupQueue.ts index 2c61f101..6c52d76e 100644 --- a/src/seqta/utils/Openers/StartupPopupQueue.ts +++ b/src/seqta/utils/Openers/StartupPopupQueue.ts @@ -11,6 +11,7 @@ import { shouldShowCoursesAssessmentsFixPopup, } from "./OpenCoursesAssessmentsFixPopup"; import { syncApiBaseToBackground } from "../DevApiBase"; +import { cloudAuth } from "../CloudAuth"; import { fetchTermsOfService, openTermsOfServicePopup, @@ -24,7 +25,7 @@ type QueueStep = (goNext: () => void) => void; * Courses/Assessments fix notice (only if features are off), * Theme of the Month (when the user hasn't dismissed this calendar month), * feedback reply notifications for pending submissions, then terms of service - * acceptance (always last). + * acceptance (always last, and only once signed in to Cloud). */ export async function runStartupPopupQueue() { // Make sure the background script knows about any dev-mode API override @@ -58,6 +59,11 @@ export async function runStartupPopupQueue() { steps.push((goNext) => { void (async () => { + // Nothing is sent to BetterSEQTA servers until the user signs in to Cloud. + if (!(await cloudAuth.getStoredToken())) { + goNext(); + return; + } const termsDocument = await fetchTermsOfService(); if (!shouldShowTermsOfServicePopup(settingsState, termsDocument)) { goNext();