mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-04 22:40:29 +03:00
lint(presence): make eslint happy
This commit is contained in:
parent
ecf65b7ca7
commit
74e64fb60a
1 changed files with 7 additions and 6 deletions
|
|
@ -255,14 +255,15 @@ function MessageNotifications() {
|
|||
|
||||
function UpdatePresence() {
|
||||
const mx = useMatrixClient();
|
||||
const onFocus = () => {
|
||||
mx.setSyncPresence(SetPresence.Online);
|
||||
};
|
||||
const onBlur = () => {
|
||||
mx.setSyncPresence(SetPresence.Unavailable);
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
const onFocus = () => {
|
||||
mx.setSyncPresence(SetPresence.Online);
|
||||
};
|
||||
const onBlur = () => {
|
||||
mx.setSyncPresence(SetPresence.Unavailable);
|
||||
}
|
||||
|
||||
window.addEventListener("focus", onFocus);
|
||||
window.addEventListener("blur", onBlur);
|
||||
onFocus();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue