1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Use spinkit instead of activityindicator

This commit is contained in:
Zhiyuan Zheng
2020-12-27 00:32:51 +01:00
parent bd5601f8f9
commit e1eade2b43
10 changed files with 245 additions and 166 deletions

View File

@ -1,21 +1,16 @@
import React, { useCallback, useEffect, useMemo, useState } from 'react'
import {
ActivityIndicator,
Pressable,
StyleSheet,
Text,
View
} from 'react-native'
import { Pressable, StyleSheet, Text, View } from 'react-native'
import { Chase } from 'react-native-animated-spinkit'
import { useQuery } from 'react-query'
import client from '@api/client'
import { Feather } from '@expo/vector-icons'
import Emojis from '@components/Timelines/Timeline/Shared/Emojis'
import relativeTime from '@utils/relativeTime'
import { useTheme } from '@utils/styles/ThemeManager'
import { StyleConstants } from '@utils/styles/constants'
import { useQuery } from 'react-query'
import { relationshipFetch } from '@utils/fetches/relationshipFetch'
import client from '@api/client'
import { toast } from '@components/toast'
import openLink from '@root/utils/openLink'
import relativeTime from '@utils/relativeTime'
import { StyleConstants } from '@utils/styles/constants'
import { relationshipFetch } from '@utils/fetches/relationshipFetch'
import { useTheme } from '@utils/styles/ThemeManager'
export interface Props {
notification: Mastodon.Notification
@ -87,7 +82,9 @@ const TimelineHeaderNotification: React.FC<Props> = ({ notification }) => {
switch (status) {
case 'idle':
case 'loading':
return <ActivityIndicator />
return (
<Chase size={StyleConstants.Font.Size.L} color={theme.secondary} />
)
case 'success':
return (
<Pressable onPress={relationshipOnPress}>