🚀 Launch 2.0.0+20

🐛 Bug fixes upload chat attachment to wrong pool
📝 Update desktop title bar text
This commit is contained in:
2024-12-10 21:45:27 +08:00
parent 1980843ac0
commit a9ca8d36bc
5 changed files with 10 additions and 3 deletions

View File

@ -346,6 +346,12 @@ class _HomeDashNotificationWidgetState extends State<_HomeDashNotificationWidget
int? _count;
Future<void> _fetchNotificationCount() async {
final ua = context.read<UserProvider>();
if (!ua.isAuthorized) {
setState(() => _count = 0);
return;
}
final sn = context.read<SnNetworkProvider>();
final resp = await sn.client.get('/cgi/id/notifications/count');
_count = resp.data['count'];