mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
Add calling and notification sounds (#119)
* Add calling and notification sounds * Fix notification visibility on any resolution * Add comments * Log howler error src * Revert removed files im stupid * Make sliders on settings use changeCommitted instead of onChange * Fix ringtone paths * Break alert words overflow * Fix tweet overflow pepega * Remove unused hook * Update volume sliders in real time * Fix resolution notifications * Fix initial value for vol sliders * Fix call duration timer bugs * Add alert when phone active and phone closes * keep notification * Stop ringing when accept
This commit is contained in:
1 parent
8ecb91e71f
commit
4eda44b9c2
28 files changed
+589
-142
No files matched your search
@@ -190,5 +190,5 @@ InjectDebugData(
|
||||
},
|
||||
},
|
||||
],
|
||||
2000
|
||||
3000
|
||||
);
|
||||
@@ -48,6 +48,7 @@ const useStyles = makeStyles(() => ({
|
||||
},
|
||||
message: {
|
||||
fontSize: '18px',
|
||||
wordBreak: 'break-all',
|
||||
},
|
||||
buttonContainer: {
|
||||
display: 'flex',
|
||||
|
||||
@@ -1,17 +1,23 @@
|
||||
import { useCallback } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { useHistory } from "react-router-dom";
|
||||
import { useRecoilState } from "recoil";
|
||||
import { useApp } from "../../../os/apps/hooks/useApps";
|
||||
import { useNotifications } from "../../../os/notifications/hooks/useNotifications";
|
||||
import { twitterState } from "./state";
|
||||
import { useCallback } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import { useRecoilState } from 'recoil';
|
||||
import { useApp } from '../../../os/apps/hooks/useApps';
|
||||
import { useNotifications } from '../../../os/notifications/hooks/useNotifications';
|
||||
import { twitterState } from './state';
|
||||
|
||||
export const useTwitterNotifications = () => {
|
||||
const { t } = useTranslation();
|
||||
const history = useHistory();
|
||||
|
||||
const { addNotificationAlert } = useNotifications();
|
||||
|
||||
const { icon, notificationIcon } = useApp('TWITTER');
|
||||
const [unreadCount, setUnreadCount] = useRecoilState(twitterState.unreadTweetsCount);
|
||||
|
||||
const [unreadCount, setUnreadCount] = useRecoilState(
|
||||
twitterState.unreadTweetsCount
|
||||
);
|
||||
|
||||
const setNotification = useCallback(
|
||||
({ profile_name, message }) => {
|
||||
setUnreadCount((curr) => {
|
||||
@@ -19,6 +25,7 @@ export const useTwitterNotifications = () => {
|
||||
addNotificationAlert(
|
||||
{
|
||||
app: 'TWITTER',
|
||||
sound: true,
|
||||
title: t('APPS_TWITTER_NEW_BROADCAST', { profile_name }),
|
||||
onClick: () => history.push('/twitter'),
|
||||
content: message,
|
||||
@@ -39,5 +46,5 @@ export const useTwitterNotifications = () => {
|
||||
[setUnreadCount, addNotificationAlert, t, icon, notificationIcon, history]
|
||||
);
|
||||
|
||||
return { setNotification, setUnreadCount, unreadCount }
|
||||
return { setNotification, setUnreadCount, unreadCount };
|
||||
};
|
||||
Reference in new issue
Block a user