Skip to content

Commit

Permalink
fixes links with empty body's not displaying
Browse files Browse the repository at this point in the history
  • Loading branch information
econnerty committed Apr 6, 2023
1 parent 2e918c0 commit 2415085
Show file tree
Hide file tree
Showing 5 changed files with 8,173 additions and 8,184 deletions.
64 changes: 32 additions & 32 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -697,26 +697,26 @@ PODS:
- GTMSessionFetcher/Core (< 4.0, >= 2.1)
- fmt (6.2.1)
- glog (0.3.5)
- GoogleDataTransport (9.2.1):
- GoogleDataTransport (9.2.2):
- GoogleUtilities/Environment (~> 7.7)
- nanopb (< 2.30910.0, >= 2.30908.0)
- PromisesObjC (< 3.0, >= 1.2)
- GoogleUtilities/AppDelegateSwizzler (7.11.0):
- GoogleUtilities/AppDelegateSwizzler (7.11.1):
- GoogleUtilities/Environment
- GoogleUtilities/Logger
- GoogleUtilities/Network
- GoogleUtilities/Environment (7.11.0):
- GoogleUtilities/Environment (7.11.1):
- PromisesObjC (< 3.0, >= 1.2)
- GoogleUtilities/Logger (7.11.0):
- GoogleUtilities/Logger (7.11.1):
- GoogleUtilities/Environment
- GoogleUtilities/Network (7.11.0):
- GoogleUtilities/Network (7.11.1):
- GoogleUtilities/Logger
- "GoogleUtilities/NSData+zlib"
- GoogleUtilities/Reachability
- "GoogleUtilities/NSData+zlib (7.11.0)"
- GoogleUtilities/Reachability (7.11.0):
- "GoogleUtilities/NSData+zlib (7.11.1)"
- GoogleUtilities/Reachability (7.11.1):
- GoogleUtilities/Logger
- GoogleUtilities/UserDefaults (7.11.0):
- GoogleUtilities/UserDefaults (7.11.1):
- GoogleUtilities/Logger
- "gRPC-C++ (1.44.0)":
- "gRPC-C++/Implementation (= 1.44.0)"
Expand Down Expand Up @@ -771,7 +771,7 @@ PODS:
- gRPC-Core/Interface (1.44.0)
- GTMSessionFetcher/Core (3.1.0)
- hermes-engine (0.70.5)
- leveldb-library (1.22.1)
- leveldb-library (1.22.2)
- libevent (2.1.12)
- Libuv-gRPC (0.0.10):
- Libuv-gRPC/Implementation (= 0.0.10)
Expand Down Expand Up @@ -1032,7 +1032,7 @@ PODS:
- React-Core
- react-native-maps (1.4.0):
- React-Core
- react-native-netinfo (9.3.7):
- react-native-netinfo (9.3.8):
- React-Core
- react-native-safe-area-context (4.5.0):
- RCT-Folly
Expand Down Expand Up @@ -1125,32 +1125,32 @@ PODS:
- React-Core
- SDWebImage (~> 5.11.1)
- SDWebImageWebPCoder (~> 0.8.4)
- RNFBApp (17.4.0):
- RNFBApp (17.4.2):
- Firebase/CoreOnly (= 10.7.0)
- React-Core
- RNFBAuth (17.4.0):
- RNFBAuth (17.4.2):
- Firebase/Auth (= 10.7.0)
- React-Core
- RNFBApp
- RNFBDatabase (17.4.0):
- RNFBDatabase (17.4.2):
- Firebase/Database (= 10.7.0)
- React-Core
- RNFBApp
- RNFBFirestore (17.4.0):
- RNFBFirestore (17.4.2):
- Firebase/Firestore (= 10.7.0)
- nanopb (< 2.30910.0, >= 2.30908.0)
- React-Core
- RNFBApp
- RNFBFunctions (17.4.0):
- RNFBFunctions (17.4.2):
- Firebase/Functions (= 10.7.0)
- React-Core
- RNFBApp
- RNFBMessaging (17.4.0):
- RNFBMessaging (17.4.2):
- Firebase/Messaging (= 10.7.0)
- FirebaseCoreExtension (= 10.7.0)
- React-Core
- RNFBApp
- RNFBStorage (17.4.0):
- RNFBStorage (17.4.2):
- Firebase/Storage (= 10.7.0)
- React-Core
- RNFBApp
Expand All @@ -1176,7 +1176,7 @@ PODS:
- React-Core
- RNReactNativeHapticFeedback (1.14.0):
- React-Core
- RNReanimated (2.14.4):
- RNReanimated (2.15.0):
- DoubleConversion
- FBLazyVector
- FBReactNativeSpec
Expand Down Expand Up @@ -1208,7 +1208,7 @@ PODS:
- React-RCTImage
- RNShare (8.2.1):
- React-Core
- RNSVG (13.8.0):
- RNSVG (13.9.0):
- React-Core
- RNVectorIcons (9.2.0):
- React-Core
Expand Down Expand Up @@ -1491,13 +1491,13 @@ SPEC CHECKSUMS:
FirebaseStorage: 4841efa304543e1f9e4ca116c559c7a1ea2a9d0f
fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b
GoogleDataTransport: ea169759df570f4e37bdee1623ec32a7e64e67c4
GoogleUtilities: c2bdc4cf2ce786c4d2e6b3bcfd599a25ca78f06f
GoogleDataTransport: 8378d1fa8ac49753ea6ce70d65a7cb70ce5f66e6
GoogleUtilities: 9aa0ad5a7bc171f8bae016300bfcfa3fb8425749
"gRPC-C++": 9675f953ace2b3de7c506039d77be1f2e77a8db2
gRPC-Core: 943e491cb0d45598b0b0eb9e910c88080369290b
GTMSessionFetcher: c9e714f7eec91a55641e2bab9f45fd83a219b882
hermes-engine: 7fe5fc6ef707b7fdcb161b63898ec500e285653d
leveldb-library: 50c7b45cbd7bf543c81a468fe557a16ae3db8729
leveldb-library: f03246171cce0484482ec291f88b6d563699ee06
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
Libuv-gRPC: 55e51798e14ef436ad9bc45d12d43b77b49df378
libwebp: f62cb61d0a484ba548448a4bd52aabf150ff6eef
Expand All @@ -1524,7 +1524,7 @@ SPEC CHECKSUMS:
react-native-image-picker: ec9b713e248760bfa0f879f0715391de4651a7cb
react-native-image-resizer: d9fb629a867335bdc13230ac2a58702bb8c8828f
react-native-maps: 7135a33610202745d08fdf151ce6b0d01952a99c
react-native-netinfo: 2517ad504b3d303e90d7a431b0fcaef76d207983
react-native-netinfo: fbc23bc2fe217155d85f2f7e0644b1654df8029b
react-native-safe-area-context: 39c2d8be3328df5d437ac1700f4f3a4f75716acc
react-native-video: c26780b224543c62d5e1b2a7244a5cd1b50e8253
React-perflogger: e68d3795cf5d247a0379735cbac7309adf2fb931
Expand All @@ -1545,23 +1545,23 @@ SPEC CHECKSUMS:
RNCMaskedView: 0e1bc4bfa8365eba5fbbb71e07fbdc0555249489
RNDateTimePicker: 65e1d202799460b286ff5e741d8baf54695e8abd
RNFastImage: 5c9c9fed9c076e521b3f509fe79e790418a544e8
RNFBApp: b0f0c53ed8a00395ceb4863910a2c1ff6e24d9f6
RNFBAuth: 6cdbfd3633030da325c011853a4b312aa40cb6ad
RNFBDatabase: 680e6477a552a7af87cc49df1e24f4b6bbb2c8ee
RNFBFirestore: 16d774335ee79cfc33106d5e124dca73af4e47bb
RNFBFunctions: 8748ffd01c62b4f7d483efbb82e83311a7ff8f65
RNFBMessaging: e683adf735d2afb847bce161dce0e4006e88a3a2
RNFBStorage: dbb6ce9ec899f3e8b3e5607b3461f7630a8ef21e
RNFBApp: 55dbfc574e5ae414f2984394934f79f87eb4b050
RNFBAuth: d30acc0f5f169bc28c7fcbf1b45cd061cc647590
RNFBDatabase: 8b3d356cff711fe4cece516a5204da3fc772ed37
RNFBFirestore: c505e6f96e70fb029ae1961c73965fd13ce92db5
RNFBFunctions: 1481ae2cbf3ba3b00d9634a96b0bc046ffbe1249
RNFBMessaging: d365361650cc697294227e1280923f35a31d2501
RNFBStorage: d40ebadfad4755ed1ef6a74cae84c9ee9ca47ffd
RNFlashList: 7fbca4fc075484a9426f1610d648dbea2de94eb0
RNFS: 4ac0f0ea233904cb798630b3c077808c06931688
RNGestureHandler: 071d7a9ad81e8b83fe7663b303d132406a7d8f39
RNImageCropPicker: 14fe1c29298fb4018f3186f455c475ab107da332
RNNotifee: bdc064c29f4d558046f51f0c3ae02bab4fd3cd85
RNReactNativeHapticFeedback: 1e3efeca9628ff9876ee7cdd9edec1b336913f8c
RNReanimated: 6668b0587bebd4b15dd849b99e5a9c70fc12ed95
RNReanimated: 716842722e1c5b0b7c56cf718e586b7f6a712879
RNScreens: 218801c16a2782546d30bd2026bb625c0302d70f
RNShare: eaee3dd5a06dad397c7d3b14762007035c5de405
RNSVG: c1e76b81c76cdcd34b4e1188852892dc280eb902
RNSVG: 53c661b76829783cdaf9b7a57258f3d3b4c28315
RNVectorIcons: fcc2f6cb32f5735b586e66d14103a74ce6ad61f8
SDWebImage: a7f831e1a65eb5e285e3fb046a23fcfbf08e696d
SDWebImageWebPCoder: 908b83b6adda48effe7667cd2b7f78c897e5111d
Expand Down
54 changes: 27 additions & 27 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/EventsScraper.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const LoadEvents = async() => {

titleList.each((i, el) => {
const title = $(el).children("a").text().trim();
console.log(title)
const halfway = Math.floor(title.length / 2);
const firstHalf = title.slice(0, halfway);
titleArray.push(firstHalf);
Expand Down
5 changes: 2 additions & 3 deletions src/PostsScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,7 @@ export function PostsScreen({navigation}) {
if (
(postText &&
postText.length < 1000 &&
postText.split(/\r\n|\r|\n/).length <= 25) || (image && !postText) || (postText.search(/(?:https?|ftp):\/\/[\n\S]+/g, '') > 0 && postText.length < 1000 && postText.split(/\r\n|\r|\n/).length <= 25)
) {
postText.split(/\r\n|\r|\n/).length <= 25) || (image && !postText)) {
setPostUploading(true)
if (image) {await uploadPic()}
if(!postIsAnonymous){
Expand Down Expand Up @@ -844,7 +843,7 @@ export function PostsScreen({navigation}) {
</View>
<View style={styles.postImageView}>
<Text style={styles.body}>{item.body.replace(/(?:https?|ftp):\/\/[\n\S]+/g, '')}</Text>
{item.body.search(/(?:https?|ftp):\/\/[\n\S]+/g, '') > 0 ? <LinkPreview containerStyle={{marginTop:20,backgroundColor:'#E7E2E1',borderRadius:20}} renderDescription={((string) => {return (<Text style={{color:'black',fontSize:10}}>{string}</Text>)})} renderTitle={((string) => {return (<Text style={{color:'black',fontWeight:'bold'}}>{string}</Text>)})} renderText={(() => {return ''})} header='' text={item.body} />: null}
{item.body.search(/(?:https?|ftp):\/\/[\n\S]+/g, '') >= 0 ? <LinkPreview containerStyle={{marginTop:20,backgroundColor:'#E7E2E1',borderRadius:20}} renderDescription={((string) => {return (<Text style={{color:'black',fontSize:10}}>{string}</Text>)})} renderTitle={((string) => {return (<Text style={{color:'black',fontWeight:'bold'}}>{string}</Text>)})} renderText={(() => {return ''})} header='' text={item.body} />: null}
{(item.extraData && item.body.search(/(?:https?|ftp):\/\/[\n\S]+/g, '') < 1) ? (
<TouchableOpacity onPress={() => {OpenImage(item.key)}}>
<FastImage
Expand Down
Loading

0 comments on commit 2415085

Please sign in to comment.