Starter Packs (#4332)
Co-authored-by: Dan Abramov <dan.abramov@gmail.com> Co-authored-by: Paul Frazee <pfrazee@gmail.com> Co-authored-by: Eric Bailey <git@esb.lol> Co-authored-by: Samuel Newman <mozzius@protonmail.com>
This commit is contained in:
parent
35f64535cb
commit
f089f45781
115 changed files with 6336 additions and 237 deletions
14
src/lib/hooks/useBottomBarOffset.ts
Normal file
14
src/lib/hooks/useBottomBarOffset.ts
Normal file
|
@ -0,0 +1,14 @@
|
|||
import {useSafeAreaInsets} from 'react-native-safe-area-context'
|
||||
|
||||
import {useWebMediaQueries} from 'lib/hooks/useWebMediaQueries'
|
||||
import {clamp} from 'lib/numbers'
|
||||
import {isWeb} from 'platform/detection'
|
||||
|
||||
export function useBottomBarOffset(modifier: number = 0) {
|
||||
const {isTabletOrDesktop} = useWebMediaQueries()
|
||||
const {bottom: bottomInset} = useSafeAreaInsets()
|
||||
return (
|
||||
(isWeb && isTabletOrDesktop ? 0 : clamp(60 + bottomInset, 60, 75)) +
|
||||
modifier
|
||||
)
|
||||
}
|
|
@ -26,6 +26,7 @@ type NotificationReason =
|
|||
| 'reply'
|
||||
| 'quote'
|
||||
| 'chat-message'
|
||||
| 'starterpack-joined'
|
||||
|
||||
type NotificationPayload =
|
||||
| {
|
||||
|
@ -142,6 +143,7 @@ export function useNotificationsHandler() {
|
|||
case 'mention':
|
||||
case 'quote':
|
||||
case 'reply':
|
||||
case 'starterpack-joined':
|
||||
resetToTab('NotificationsTab')
|
||||
break
|
||||
// TODO implement these after we have an idea of how to handle each individual case
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue