mirror of
https://github.com/we-promise/sure.git
synced 2026-04-07 14:31:25 +00:00
fix: Use getValidAccessToken() in connectivity banner sync button
Replace direct authProvider.tokens?.accessToken access with getValidAccessToken() so the Sync Now button works in API-key auth mode where _tokens is null. https://claude.ai/code/session_01DnyCzdMjVpSsbBZK3XbzUH
This commit is contained in:
@@ -101,11 +101,15 @@ class _ConnectivityBannerState extends State<ConnectivityBanner> {
|
||||
return TextButton(
|
||||
onPressed: _isSyncing
|
||||
? null
|
||||
: () => _handleSync(
|
||||
: () async {
|
||||
final accessToken = await authProvider.getValidAccessToken();
|
||||
if (!context.mounted) return;
|
||||
_handleSync(
|
||||
context,
|
||||
authProvider.tokens?.accessToken,
|
||||
accessToken,
|
||||
transactionsProvider,
|
||||
),
|
||||
);
|
||||
},
|
||||
style: TextButton.styleFrom(
|
||||
foregroundColor: Colors.blue.shade900,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user