|
|
@@ -42,7 +42,9 @@ class AccountRepository {
|
|
|
Rxn<MemberInfo> memberStatusInfo = Rxn<MemberInfo>();
|
|
|
|
|
|
bool get isVipUser =>
|
|
|
- memberStatusInfo.value != null && memberStatusInfo.value!.isMember && isLogin.value;
|
|
|
+ memberStatusInfo.value != null &&
|
|
|
+ memberStatusInfo.value!.isMember &&
|
|
|
+ isLogin.value;
|
|
|
|
|
|
int? _lastRequestCodeTime;
|
|
|
int _errorCodeTimes = 0;
|
|
|
@@ -205,8 +207,8 @@ class AccountRepository {
|
|
|
KVUtil.putString(keyAccountLoginPhoneNum, phoneNum);
|
|
|
KVUtil.putString(keyAccountLoginToken, authToken);
|
|
|
keyboardRepository.refreshData();
|
|
|
- // 登录登录,通知键盘刷新数据
|
|
|
- KeyboardAndroidPlatform.refreshData();
|
|
|
+ // 登录,通知键盘刷新数据
|
|
|
+ _notifyKeyboardPluginRefreshData();
|
|
|
}
|
|
|
|
|
|
void onWechatLoginSuccess(String authToken) {
|
|
|
@@ -214,6 +216,8 @@ class AccountRepository {
|
|
|
refreshUserInfo();
|
|
|
KVUtil.putString(keyAccountLoginToken, authToken);
|
|
|
keyboardRepository.refreshData();
|
|
|
+ // 微信登录,通知键盘刷新数据
|
|
|
+ _notifyKeyboardPluginRefreshData();
|
|
|
}
|
|
|
|
|
|
void logout() {
|
|
|
@@ -229,7 +233,14 @@ class AccountRepository {
|
|
|
KVUtil.putString(Constants.keyboardSelect, null);
|
|
|
DailyLimiterUtil.clearDailyLimitData("SurpriseDialog");
|
|
|
// 退出登录,通知键盘刷新数据
|
|
|
- KeyboardAndroidPlatform.refreshData();
|
|
|
+ _notifyKeyboardPluginRefreshData();
|
|
|
+ }
|
|
|
+
|
|
|
+ /// 通知键盘刷新数据
|
|
|
+ void _notifyKeyboardPluginRefreshData() {
|
|
|
+ Future.delayed(const Duration(milliseconds: 500), () {
|
|
|
+ KeyboardAndroidPlatform.refreshData();
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
// 意见反馈
|