Skip to content

Commit 391f0bf

Browse files
authored
Merge pull request #290 from Crossbell-Box/develop
Develop
2 parents 9473ab2 + 528253e commit 391f0bf

10 files changed

Lines changed: 17 additions & 38 deletions

File tree

.changeset/sixty-sloths-add.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"xlog": patch
3+
---
4+
5+
Make some content that displays abnormally display normally.

.changeset/twenty-plants-rhyme.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"xlog": patch
3+
---
4+
5+
Push a new screen on current navigation tree.

src/components/CommentList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ export const CommentList = forwardRef<CommentListInstance, Props>((
148148
}}
149149
ListFooterComponent={comments.isFetchingNextPage && <Spinner paddingVertical="$5"/>}
150150
ListEmptyComponent={<EmptyComponent isLoading={comments.isFetching}/>}
151-
keyExtractor={item => item.blockNumber?.toString()}
151+
keyExtractor={item => item.transactionHash?.toString()}
152152
renderItem={(options) => {
153153
const comment = options.item;
154154
const depth = 0;

src/components/FeedList/FeedListItem/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export const FeedListItem: FC<Props> = (props) => {
5454
}, [coverImageSize.height]);
5555

5656
const onPress = React.useCallback(() => {
57-
navigation.navigate(
57+
navigation.push(
5858
"PostDetails",
5959
{
6060
characterId: note.characterId,

src/pages/CharacterList/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export const CharacterListPage: FC<NativeStackScreenProps<RootStackParamList, "C
7777
}}
7878
contentContainerStyle={{ paddingBottom: bottom }}
7979
data={list}
80-
keyExtractor={(item: CharacterEntity) => item?.blockNumber?.toString?.()}
80+
keyExtractor={item => item?.transactionHash?.toString?.()}
8181
estimatedItemSize={100}
8282
estimatedListSize={{
8383
height: height - top - bottom,

src/pages/PostDetails/BottomSheetLikeList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export const BottomSheetLikeList: FC<{
3838
}}
3939
contentContainerStyle={{ padding: 20, paddingBottom: bottom }}
4040
data={data}
41-
keyExtractor={item => item?.characterId?.toString()}
41+
keyExtractor={item => item?.transactionHash?.toString()}
4242
ListEmptyComponent={(
4343
<Stack height={300}>
4444
{

src/pages/PostDetails/javascript-content.ts

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,7 @@
1-
const lazyLoadImages = `
2-
var imagesToBlock = [];
3-
4-
window.addEventListener("load", function() {
5-
var restoreImages = function() {
6-
for (var i = 0; i < imagesToBlock.length; i++) {
7-
imagesToBlock[i].src = imagesToBlock[i].getAttribute("data-src");
8-
}
9-
imagesToBlock = [];
10-
};
11-
12-
var blockImages = function() {
13-
var images = document.getElementsByTagName("img");
14-
for (var i = 0; i < images.length; i++) {
15-
imagesToBlock.push(images[i]);
16-
images[i].setAttribute("data-src", images[i].src);
17-
images[i].src = "";
18-
}
19-
};
20-
21-
document.addEventListener("DOMContentLoaded", function() {
22-
restoreImages();
23-
});
24-
25-
blockImages();
26-
});
27-
`;
28-
291
export const javaScriptContentLoaded = (
302
bottomBarHeight: number,
313
height: number,
324
) => `
33-
${lazyLoadImages}
34-
355
const meta = document.createElement('meta');
366
meta.setAttribute('content', 'width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0');
377
meta.setAttribute('name', 'viewport');

src/pages/Profile/Comments/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export const CommentsPage: FC<NativeStackScreenProps<RootStackParamList, "Commen
4444
comments?.fetchNextPage?.();
4545
}}
4646
ListFooterComponent={(comments.isFetchingNextPage || (comments.isFetching && flattedComments.length === 0)) && <Spinner paddingBottom="$5"/>}
47-
keyExtractor={item => item.transactionHash}
47+
keyExtractor={item => item.transactionHash?.toString()}
4848
renderItem={({ item }) => {
4949
const type = item.toNote?.metadata?.content?.tags?.[0];
5050
let toTitle: string;

src/pages/Profile/Notifications/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ const NotificationsPage: FC<NativeStackScreenProps<RootStackParamList, "Notifica
9191
}}>
9292
<FlashList
9393
data={data}
94-
keyExtractor={item => item.transactionHash}
94+
keyExtractor={item => item.transactionHash?.toString?.()}
9595
ListEmptyComponent={(
9696
<Stack minHeight={containerHeight - 50}>
9797
{

src/pages/Replies/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,13 @@ export const RepliesPage: FC<NativeStackScreenProps<RootStackParamList, "Replies
7979
}}
8080
ListFooterComponent={(comments.isFetchingNextPage || (comments.isFetching && flattedComments.length === 0)) && <Spinner paddingBottom="$5"/>}
8181
showsVerticalScrollIndicator={false}
82-
keyExtractor={item => item?.data?.blockNumber?.toString()}
82+
keyExtractor={item => item?.data?.transactionHash?.toString()}
8383
renderItem={({ item }) => {
8484
return (
8585
<Stack paddingHorizontal={16}>
8686
<CommentItem
8787
editable
8888
commentable
89-
key={item?.data?.blockNumber?.toString()}
9089
padding={0}
9190
comment={item?.data}
9291
depth={item?.depth}

0 commit comments

Comments
 (0)