From 4ae6fbd3c8e8be9d47d0bd959aeac380f7bf67ce Mon Sep 17 00:00:00 2001
From: Paul Frazee <pfrazee@gmail.com>
Date: Tue, 15 Nov 2022 12:07:41 -0600
Subject: Better loading screens

---
 src/view/com/post/PostText.tsx | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

(limited to 'src/view/com/post/PostText.tsx')

diff --git a/src/view/com/post/PostText.tsx b/src/view/com/post/PostText.tsx
index 541f2fc16..5d6c45113 100644
--- a/src/view/com/post/PostText.tsx
+++ b/src/view/com/post/PostText.tsx
@@ -1,6 +1,8 @@
 import React, {useState, useEffect} from 'react'
 import {observer} from 'mobx-react-lite'
-import {ActivityIndicator, Text, View} from 'react-native'
+import {Text, View} from 'react-native'
+import {LoadingPlaceholder} from '../util/LoadingPlaceholder'
+import {ErrorMessage} from '../util/ErrorMessage'
 import {PostModel} from '../../../state/models/post'
 import {useStores} from '../../../state'
 
@@ -28,7 +30,9 @@ export const PostText = observer(function PostText({
   if (!model || model.isLoading || model.uri !== uri) {
     return (
       <View>
-        <ActivityIndicator />
+        <LoadingPlaceholder width="100%" height={8} style={{marginTop: 6}} />
+        <LoadingPlaceholder width="100%" height={8} style={{marginTop: 6}} />
+        <LoadingPlaceholder width={100} height={8} style={{marginTop: 6}} />
       </View>
     )
   }
@@ -38,7 +42,7 @@ export const PostText = observer(function PostText({
   if (model.hasError) {
     return (
       <View>
-        <Text style={style}>{model.error}</Text>
+        <ErrorMessage style={style} message={model.error} />
       </View>
     )
   }
-- 
cgit 1.4.1

