Skip to content

Commit ccfa214

Browse files
Merge branch 'fix-9'
2 parents 8b3c48c + 65b810d commit ccfa214

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Forms/Components/GazeBanner.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@ public function takeControl()
137137
}
138138
}
139139

140-
Cache::put('filament-gaze-' . $identifier, $curViewers, now()->addSeconds($this->pollTimer * 2));
140+
Cache::put('filament-gaze-' . $identifier, $curViewers, now()->addSeconds(max([5, $this->pollTimer * 2])));
141+
141142
}
142143

143144
public function getIdentifier()
@@ -224,7 +225,7 @@ function () {
224225
'id' => auth()->guard($authGuard)->id(),
225226
'guard' => $authGuard,
226227
'name' => $user?->name ?? $user?->getFilamentName() ?? 'Unknown', // Possibly need to account for more?
227-
'expires' => now()->addSeconds($this->pollTimer * 2),
228+
'expires' => now()->addSeconds(max([5, $this->pollTimer * 2])),
228229
'has_control' => $this->isLockable && ($lockState || (count($curViewers) === 0)),
229230
];
230231

0 commit comments

Comments
 (0)