Compare commits

...
3 changed files with 5 additions and 9 deletions
+1 -3
View File
@@ -14,7 +14,7 @@ public partial class PopupWindow : Window
private static readonly UsageViewModel VM = App.ViewModel; private static readonly UsageViewModel VM = App.ViewModel;
private static readonly UpdateManager Updater = App.Updater; private static readonly UpdateManager Updater = App.Updater;
private readonly DispatcherTimer _clockTimer; private readonly DispatcherTimer _clockTimer;
private bool _dialogOpen;
[DllImport("dwmapi.dll")] [DllImport("dwmapi.dll")]
private static extern int DwmSetWindowAttribute(IntPtr hwnd, int attr, ref int value, int size); private static extern int DwmSetWindowAttribute(IntPtr hwnd, int attr, ref int value, int size);
@@ -312,14 +312,12 @@ public partial class PopupWindow : Window
private async void SignIn_Click(object s, RoutedEventArgs e) private async void SignIn_Click(object s, RoutedEventArgs e)
{ {
_dialogOpen = true;
var login = new LoginWindow { Owner = this }; var login = new LoginWindow { Owner = this };
if (login.ShowDialog() == true) if (login.ShowDialog() == true)
{ {
await VM.RefreshAsync(); await VM.RefreshAsync();
InitSettings(); InitSettings();
} }
_dialogOpen = false;
Show(); Show();
Activate(); Activate();
} }
+3 -5
View File
@@ -1,6 +1,4 @@
## What's new in beta.21 ## What's new in beta.22
- Fixed: clicking Sign In now auto-closes as soon as you are detected as signed in (no need to click Done) - Fixed build error: Task unwrap for Dispatcher.InvokeAsync with async lambda
- Fixed: login now fetches and caches your data directly via the browser session (no more authentication failures) - Removed unused field warning
- Fixed: periodic refresh falls back to browser-session API calls when HttpClient is rejected
- Fixed: cached usage from login is shown immediately while refreshing
+1 -1
View File
@@ -212,7 +212,7 @@ public class UsageViewModel : INotifyPropertyChanged
host.Show(); host.Show();
try { return await host.FetchAsync("https://claude.ai", script); } try { return await host.FetchAsync("https://claude.ai", script); }
finally { host.Close(); } finally { host.Close(); }
}).Task; }).Task.Unwrap();
if (resultJson == null || resultJson == "null") return ([], null, null); if (resultJson == null || resultJson == "null") return ([], null, null);