Skip to content

Commit

Permalink
feat: pull-up to load at category screen
Browse files Browse the repository at this point in the history
  • Loading branch information
hashiqi12138 committed Sep 7, 2021
1 parent ea9d8f8 commit 9a79047
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions App/Screens/CategoriesScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ function CategoriesScreen(props): React.ReactElement {
const verlocity = event.velocity.y;

console.log(verlocity, _num);
if (verlocity && _num < 600) {
if (verlocity && _num < 800) {
setPageNo(pageNo + 1);
}
}
Expand Down Expand Up @@ -243,7 +243,7 @@ function CategoriesScreen(props): React.ReactElement {
/>
))}
</View>
<ScrollView onScroll={_onScroll}>
<ScrollView onScrollEndDrag={_onScroll}>
<ComicBlock comics={comics} navigator={props.navigation} />
</ScrollView>
</SafeAreaView>
Expand Down
4 changes: 2 additions & 2 deletions App/Screens/ExploreScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,13 @@ export function ComicBlock({navigator}): React.ReactElement {
const verlocity = event.velocity.y;

console.log(verlocity, _num);
if (verlocity && _num < 600) {
if (verlocity && _num < 800) {
setPageNo(pageNo + 1);
}
}
return (
<SafeAreaView>
<ScrollView onScroll={_onScroll}>
<ScrollView onScrollEndDrag={_onScroll}>
<View style={styles.container}>
{comics.map((item: ComicPosterProps) => {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ static Bitmap download(String url) throws Exception {
OkHttpClient client = new OkHttpClient.Builder().addInterceptor(new RetryInterceptor(5)).build();

//获取请求对象
Request request = new Request.Builder().url(url).addHeader("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.190 Safari/537.36").addHeader("referer", url).build();
Request request = new Request.Builder().url(url).addHeader("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.63 Safari/537.36").addHeader("referer", "https://18comic.vip/").build();

//获取响应体

Expand Down

0 comments on commit 9a79047

Please sign in to comment.