Logo
Explore Help
Register Sign In
keejef
/
session-desktop
mirror of https://github.com/oxen-io/session-desktop
2
0
Fork
You've already forked session-desktop
0
Code Issues 8 Projects Releases Wiki Activity
session-desktop/ts/hooks/useDisableDrag.ts

14 lines
293 B
TypeScript
Raw Normal View History Unescape Escape

Minor call tweaks (#2051) * show missed-call,started-call and answered call notification in chat * fix types for createLastMessageUpdate * show incoming dialog if we have a pending call when enable call receptio * simplify a bit the avatar component * move disableDrag to a custom hook * speed up hash colors of avatarPlaceHolders * fixup text selection and double click reply on message * keep avatar decoded items longer before releasing memory * add incoming/outgoing/missed call notification also, merge that notification with the timer and group notification component * hangup call if no answer after 30sec * refactor SessionInput using hook + add testid field for recovery * disable message request feature flag for now * fix merge issue * force loading screen to be black instead of white for our dark theme user's eyes safety
4 years ago
import { useCallback } from 'react';
/**
* This memoized function just returns a callback which can be used to disable the onDragStart event
*/
export const useDisableDrag = () => {
const cb = useCallback((e: any) => {
e.preventDefault();
return false;
}, []);
return cb;
};
Powered by Gitea Version: 1.19.1 Page: 81ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API