[Threadgate] Tweak threadgate buttons (#9173)
* tweak in-post threadgate button * tweak composer threadgate button * reduce date length slightly * pressed styles * make date length depend on breakpoint * add chevron to label btn * add tiny chevron, special-case button icon width * [Threadgate] Add hint (#9350) * get tooltip working on web * add compatibility layer for working in iOS sheets * add timeout to profile tooltip now that it appears instantly * rm debug code * Update ThreadgateBtn.tsx Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com> * remeasure when keyboard changes --------- Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com> * fix types * [Threadgate] Refresh dialog (#9342) * wip new ui * update threadgate dialog with new designs * restore nobody option * relayout android sheet when ratio changes * fix ratio changing case in bottom sheet * timebox reached, use setTimeout * update panel styles * missing imports * extract out Panel * tweak layout animation * fix icon color * use same color mechamism for icon as text * restore the header * refreshed toggle styles (#9343) * [Threadgate] Persist settings (#9341) * add persist toggle to threadgate dialog * move state back down * sort out spacing * wire up query * @surfdude29 tweaks * use tiny chevron in WhoCanReply * wait for prefetch before opening * move Panel into the Toggle namespace * default -> pref * use medium date length * rm hover state from web selects, fix border radius * fix key issue in Selects --------- Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import {createContext, useContext, useMemo, useRef, useState} from 'react'
|
||||
import {View} from 'react-native'
|
||||
import {type StyleProp, View, type ViewStyle} from 'react-native'
|
||||
import {
|
||||
Gesture,
|
||||
GestureDetector,
|
||||
@@ -29,8 +29,10 @@ Context.displayName = 'GlobalGestureEventsContext'
|
||||
|
||||
export function GlobalGestureEventsProvider({
|
||||
children,
|
||||
style,
|
||||
}: {
|
||||
children: React.ReactNode
|
||||
style?: StyleProp<ViewStyle>
|
||||
}) {
|
||||
const refCount = useRef(0)
|
||||
const events = useMemo(() => new EventEmitter<GlobalGestureEvents>(), [])
|
||||
@@ -73,7 +75,9 @@ export function GlobalGestureEventsProvider({
|
||||
return (
|
||||
<Context.Provider value={ctx}>
|
||||
<GestureDetector gesture={gesture}>
|
||||
<View collapsable={false}>{children}</View>
|
||||
<View collapsable={false} style={style}>
|
||||
{children}
|
||||
</View>
|
||||
</GestureDetector>
|
||||
</Context.Provider>
|
||||
)
|
||||
|
||||
@@ -4,7 +4,13 @@ import {useMutation, useQueryClient} from '@tanstack/react-query'
|
||||
import {preferencesQueryKey} from '#/state/queries/preferences'
|
||||
import {useAgent} from '#/state/session'
|
||||
|
||||
export function usePostInteractionSettingsMutation() {
|
||||
export function usePostInteractionSettingsMutation({
|
||||
onError,
|
||||
onSettled,
|
||||
}: {
|
||||
onError?: (error: Error) => void
|
||||
onSettled?: () => void
|
||||
} = {}) {
|
||||
const qc = useQueryClient()
|
||||
const agent = useAgent()
|
||||
return useMutation({
|
||||
@@ -16,5 +22,7 @@ export function usePostInteractionSettingsMutation() {
|
||||
queryKey: preferencesQueryKey,
|
||||
})
|
||||
},
|
||||
onError,
|
||||
onSettled,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user