mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
fix: update grpc headers
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:PiliPlus/grpc/grpc_repo.dart';
|
||||
import 'package:PiliPlus/http/loading_state.dart';
|
||||
import 'package:PiliPlus/http/user.dart';
|
||||
import 'package:PiliPlus/models/common/dynamics_type.dart';
|
||||
@@ -26,6 +27,7 @@ class LoginUtils {
|
||||
|
||||
static Future onLoginMain() async {
|
||||
final account = Accounts.main;
|
||||
GrpcRepo.updateHeaders(account.accessKey);
|
||||
try {
|
||||
final cookies = account.cookieJar.toList();
|
||||
final webManager = web.CookieManager();
|
||||
@@ -111,6 +113,8 @@ class LoginUtils {
|
||||
}
|
||||
|
||||
static Future onLogoutMain() async {
|
||||
GrpcRepo.updateHeaders(null);
|
||||
|
||||
await Future.wait([
|
||||
web.CookieManager().deleteAllCookies(),
|
||||
GStorage.userInfo.delete('userInfoCache'),
|
||||
|
||||
Reference in New Issue
Block a user