fix(mobile): improve loading indicator visibility in NavigationHeader and feeds context menu
- Added z-index to the loading indicator in NavigationHeader to ensure it appears above other elements. - Integrated PlatformActivityIndicator in the SubscriptionFeedCategoryContextMenu to display a loading state when fetching entries. Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
parent
8e9b92babc
commit
7801aef62b
|
|
@ -334,7 +334,7 @@ export const InternalNavigationHeader = ({
|
|||
{/* Only show loading indicator when headerTitle is not absolute */}
|
||||
{!headerTitleAbsolute && isLoading && (
|
||||
<View
|
||||
className="absolute right-0"
|
||||
className="absolute right-0 z-10"
|
||||
style={{ transform: [{ translateX: "100%" }, { scale: 0.74 }] }}
|
||||
>
|
||||
<PlatformActivityIndicator size="small" />
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import type { ListRenderItemInfo } from "react-native"
|
|||
import { Alert, FlatList, View } from "react-native"
|
||||
|
||||
import { ContextMenu } from "@/src/components/ui/context-menu"
|
||||
import { PlatformActivityIndicator } from "@/src/components/ui/loading/PlatformActivityIndicator"
|
||||
import { views } from "@/src/constants/views"
|
||||
import { useNavigation } from "@/src/lib/navigation/hooks"
|
||||
import type { Navigation } from "@/src/lib/navigation/Navigation"
|
||||
|
|
@ -322,7 +323,7 @@ export const SubscriptionFeedCategoryContextMenu = ({
|
|||
const PreviewFeeds = (props: { id: string; view: FeedViewType }) => {
|
||||
const { id: feedId } = props
|
||||
const entryIds = useEntryIdsByFeedId(feedId)
|
||||
usePrefetchEntries({ feedId, limit: 5 })
|
||||
const { isLoading } = usePrefetchEntries({ feedId, limit: 5 })
|
||||
|
||||
const renderItem = useCallback(
|
||||
({ item: id }: ListRenderItemInfo<string>) => (
|
||||
|
|
@ -332,6 +333,9 @@ const PreviewFeeds = (props: { id: string; view: FeedViewType }) => {
|
|||
)
|
||||
return (
|
||||
<View className="bg-system-background size-full flex-1">
|
||||
{isLoading && !entryIds?.length && (
|
||||
<PlatformActivityIndicator className="absolute inset-0 flex items-center justify-center" />
|
||||
)}
|
||||
<FlatList
|
||||
scrollEnabled={false}
|
||||
data={useMemo(() => entryIds?.slice(0, 5), [entryIds])}
|
||||
|
|
|
|||
Loading…
Reference in New Issue