Fix text zoom not actually syncing, and expose it in Settings
Two real gaps meant the account-synced zoom (from the previous "sync through the account" change) never reached the screen: _load_cache() updated AccountProfileService.preferences but never emitted profile_changed, so question_player.gd/ccs_service.gd (already built and listening before login even happens) never found out a cached value had loaded. And nothing forced a server refresh right after login - it only fired if the user happened to open the profile/progress screen, so a fresh device/session had no path to the true synced value at all. main.gd now calls AccountProfileService.refresh() once per login (not on every silent token refresh) so the real preferences GET always runs right after signing in, on any device. Also added Question bank/CCS case text size steppers to the Settings screen next to dark mode, per user request, reusing the same AccountProfileService/CCSService plumbing as the in-screen A-/A+ buttons.
This commit is contained in:
@@ -5,6 +5,7 @@ const Brand := preload("res://scripts/ui/medmind_style.gd")
|
||||
const NavigationRoutes := preload("res://scripts/ui/navigation_routes.gd")
|
||||
|
||||
var screens := {}
|
||||
var _account_profile_synced := false
|
||||
var header_panel: PanelContainer
|
||||
var header_title: Label
|
||||
var environment_badge: Label
|
||||
@@ -755,6 +756,12 @@ func open_legal_document(kind: String) -> void:
|
||||
|
||||
func _on_auth_changed() -> void:
|
||||
_refresh_header_controls()
|
||||
if AuthState.is_logged_in:
|
||||
if not _account_profile_synced:
|
||||
_account_profile_synced = true
|
||||
AccountProfileService.refresh()
|
||||
else:
|
||||
_account_profile_synced = false
|
||||
if AuthState.is_logged_in and AuthState.requires_legal_acceptance and current_screen_name not in ["login", "legal_consent"]:
|
||||
show_screen("legal_consent")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user