1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00
This commit is contained in:
Zhiyuan Zheng
2021-01-12 00:12:44 +01:00
parent 284d6e46e0
commit 2df172d026
23 changed files with 311 additions and 227 deletions

View File

@ -381,7 +381,8 @@ const useTimelineMutation = ({
onSettled,
...(typeof onSuccess === 'function'
? { onSuccess }
: {
: onSuccess
? {
onSuccess: (data, params) => {
queryClient.cancelQueries(params.queryKey)
@ -397,7 +398,8 @@ const useTimelineMutation = ({
break
}
}
}),
}
: undefined),
...(onMutate && {
onMutate: params => {
queryClient.cancelQueries(params.queryKey)

View File

@ -11,7 +11,6 @@ const updateStatus = ({
}) => {
switch (payload.property) {
case 'poll':
console.log(payload.data)
if (reblog) {
item.reblog!.poll = payload.data
} else {

View File

@ -19,7 +19,7 @@ export const ManageThemeContext = createContext<ContextType>({
export const useTheme = () => useContext(ManageThemeContext)
const useColorSchemeDelay = (delay = 250) => {
const useColorSchemeDelay = (delay = 500) => {
const [colorScheme, setColorScheme] = React.useState(
Appearance.getColorScheme()
)

View File

@ -23,15 +23,15 @@ const themeColors: {
} = {
primary: {
light: 'rgb(18, 18, 18)',
dark: 'rgb(218, 218, 218)'
dark: 'rgb(180, 180, 180)'
},
primaryOverlay: {
light: 'rgb(250, 250, 250)',
dark: 'rgb(218, 218, 218)'
dark: 'rgb(180, 180, 180)'
},
secondary: {
light: 'rgb(135, 135, 135)',
dark: 'rgb(135, 135, 135)'
dark: 'rgb(130, 130, 130)'
},
disabled: {
light: 'rgb(200, 200, 200)',
@ -48,30 +48,30 @@ const themeColors: {
background: {
light: 'rgb(250, 250, 250)',
dark: 'rgb(18, 18, 18)'
dark: 'rgb(25, 25, 25)'
},
backgroundGradientStart: {
light: 'rgba(250, 250, 250, 0.5)',
dark: 'rgba(18, 18, 18, 0.5)'
dark: 'rgba(25, 25, 25, 0.5)'
},
backgroundGradientEnd: {
light: 'rgba(250, 250, 250, 1)',
dark: 'rgba(18, 18, 18, 1)'
dark: 'rgba(25, 25, 25, 1)'
},
backgroundOverlay: {
light: 'rgba(18, 18, 18, 0.5)',
light: 'rgba(25, 25, 25, 0.5)',
dark: 'rgba(0, 0, 0, 0.5)'
},
border: {
light: 'rgba(18, 18, 18, 0.3)',
light: 'rgba(25, 25, 25, 0.3)',
dark: 'rgba(255, 255, 255, 0.3)'
},
shimmerDefault: {
light: 'rgba(18, 18, 18, 0.05)',
light: 'rgba(25, 25, 25, 0.05)',
dark: 'rgba(250, 250, 250, 0.05)'
},
shimmerHighlight: {
light: 'rgba(18, 18, 18, 0.15)',
light: 'rgba(25, 25, 25, 0.15)',
dark: 'rgba(250, 250, 250, 0.15)'
}
}