fix(mobile-app): 修改秘密点击解锁逻辑,点击19次后需等待2秒

- 连续点击19次后启动2秒定时器
- 2秒内再次点击会取消并重新计时
- 确保用户停止点击后才显示"我的同僚"

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
hailin 2025-12-27 11:26:22 -08:00
parent b20ec10c75
commit a54a01bba0
1 changed files with 16 additions and 4 deletions

View File

@ -891,6 +891,8 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
_referralDebounceTimer?.cancel();
_authorizationDebounceTimer?.cancel();
_walletDebounceTimer?.cancel();
//
_teamPlantingUnlockTimer?.cancel();
// super.dispose()
try {
ref.read(walletStatusProvider.notifier).stopPolling();
@ -3173,10 +3175,16 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
);
}
/// 19"我的团队"
/// 192"我的同僚"
Timer? _teamPlantingUnlockTimer;
void _onTeamPlantingTap() {
final now = DateTime.now();
//
_teamPlantingUnlockTimer?.cancel();
_teamPlantingUnlockTimer = null;
// 1
if (_lastTeamPlantingTapTime != null &&
now.difference(_lastTeamPlantingTapTime!).inMilliseconds > 1000) {
@ -3186,10 +3194,14 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
_lastTeamPlantingTapTime = now;
_teamPlantingTapCount++;
// 19
// 192
if (_teamPlantingTapCount == 19) {
setState(() {
_showMyTeamTree = true;
_teamPlantingUnlockTimer = Timer(const Duration(seconds: 2), () {
if (mounted) {
setState(() {
_showMyTeamTree = true;
});
}
});
}
// 19