Skip to content

Commit

Permalink
- publish v7.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
czy0729 committed Mar 2, 2023
1 parent 048c930 commit 9de9530
Show file tree
Hide file tree
Showing 16 changed files with 103 additions and 73 deletions.
4 changes: 2 additions & 2 deletions App.android.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
* @Author: czy0729
* @Date: 2019-03-30 19:25:19
* @Last Modified by: czy0729
* @Last Modified time: 2023-02-24 17:31:19
* @Last Modified time: 2023-03-02 23:21:14
*/
// import '@utils/thirdParty/stable-sort'
import '@utils/thirdParty/stable-sort'
import 'react-native-gesture-handler'
import React, { useEffect } from 'react'
import { LogBox } from 'react-native'
Expand Down
23 changes: 10 additions & 13 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -62,26 +62,23 @@ Google Play 被恶意举报已被暂停申诉无果,因为不同渠道包互

## Update

v7.8.0 - 2023/02/15
v7.9.0 - 2023/03/03

[图文说明](https://www.yuque.com/chenzhenyu-k0epm/znygb4/ww1hgenu9g6kb1gs?singleDoc)

—— 新增 ——

- [x] [发现] 添加看板娘 Live2D(自定义按钮中的发现相关设置,迁移到设置中心里单独选项卡,点击播放声音需要手动到设置里开启)
- [x] [设置] 屏蔽功能迭代,单独作为一设置项;范围扩大到条目评论、时间胶囊、超展开相关信息(甚至还带统计屏蔽次数)
[图文说明](https://www.yuque.com/chenzhenyu-k0epm/znygb4/ia218hdgptzlfnrt?singleDoc)

—— 优化 ——

- [x] [空间] 左侧历史按钮文字替换成用户 xxx 前活跃
- [x] [目录详情] 调整上方目录信息布局,增加目录留言(webview)和 TA 的其他目录入口,并修复了收藏后没及时更新星星状态的问题
- [x] [帖子] 新增设置允许自动加载楼层中的图片
- [x] [帖子] 媒体块样式优化
- [x] [组件] 多行输入框功能优化(加高了输入框、多行文字不会再遮挡底部按钮、宣传语允许折叠)
- [x] [系统] 点击跳转相关交互,都追加了触摸后反馈动画
- [x] [进度、条目] 收藏状态和章节按钮状态转变后,增加了小动画 (后续版本应该会把动画是否开启作为一个配置项)
- [x] [帖子] 回复楼层时, 会把楼层的部分正文在输入框 placeholder 里显示
- [x] [帖子] 回复框中常用 bgm 表情选择后不会改变常用的排序
- [x] [进度] 收藏管理框,吐槽输入框增加恢复历史的按钮
- [x] [SMB] 功能迭代(改善了一点用法,更方便)
- [x] [电波提醒] 优化了切换时头像闪一下的问题

—— 修复 ——

- [x] [日志] 修复了部分日志进入闪退的问题
- [x] [进度] 修复了在刷新条目信息时, 有概率卡死程序的问题

[CHANGELOGS](https://github.com/czy0729/Bangumi/blob/master/web/CHANGELOG.MD)

Expand Down
4 changes: 2 additions & 2 deletions app.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"expo": {
"description": "A React Native App for https://bgm.tv, tinygrail plugin 4.5.0",
"version": "7.8.0",
"version": "7.9.0",
"android": {
"versionCode": 70800,
"versionCode": 70900,
"package": "com.czy0729.bangumi",
"adaptiveIcon": {
"foregroundImage": "./src/assets/images/foreground.png",
Expand Down
4 changes: 2 additions & 2 deletions config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @Author: czy0729
* @Date: 2019-06-02 14:42:28
* @Last Modified by: czy0729
* @Last Modified time: 2023-02-28 17:24:29
* @Last Modified time: 2023-03-03 00:03:15
*/
import { Paths } from '@types'

Expand All @@ -28,7 +28,7 @@ export const TEXT_ONLY = DEV ? !DEV : false
const CONFIGS: Configs = {
initialRouteName: 'HomeTab', // HomeTab
initialRouteParams: {
// subjectId: 115908 // anime: 296870, music: 302514, book: 267358, game: 137458
// subjectId: 393217 // anime: 296870, music: 302514, book: 267358, game: 137458
// topicId: 'group/376561' // group/366561
// userId: 456208 // 456208, 419012, 'lilyurey'
// monoId: 'person/5745' // character/70323 person/5745
Expand Down
6 changes: 3 additions & 3 deletions src/components/blur-view/styles.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
* @Author: czy0729
* @Date: 2022-05-03 23:03:26
* @Last Modified by: czy0729
* @Last Modified time: 2022-05-03 23:03:26
* @Last Modified by: czy0729
* @Last Modified time: 2023-03-03 01:24:23
*/
import { _ } from '@stores'

Expand All @@ -22,6 +22,6 @@ export const styles = _.create({
right: 0,
bottom: 0,
left: 0,
backgroundColor: 'rgba(0, 0, 0, 0.24)'
backgroundColor: 'rgba(0, 0, 0, 0.32)'
}
})
5 changes: 3 additions & 2 deletions src/components/render-html/toggle-image/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
* @Author: czy0729
* @Date: 2022-05-17 06:41:29
* @Last Modified by: czy0729
* @Last Modified time: 2023-02-23 23:03:02
* @Last Modified time: 2023-03-03 01:23:27
*/
import { _ } from '@stores'

export const memoStyles = _.memoStyles(() => ({
image: {
paddingVertical: 4,
paddingVertical: _.ios(4, 0),
marginTop: 4,
marginBottom: 4
},
isLoad: {
Expand Down
5 changes: 3 additions & 2 deletions src/components/touchable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @Author: czy0729
* @Date: 2019-03-28 15:35:04
* @Last Modified by: czy0729
* @Last Modified time: 2023-03-02 16:33:25
* @Last Modified time: 2023-03-03 00:03:43
*/
import React from 'react'
import { observer } from 'mobx-react'
Expand Down Expand Up @@ -36,7 +36,8 @@ export const Touchable = observer(
children,
...other
}: TouchableProps) => {
const _useRN = !IOS && DEV ? true : useRN
// const _useRN = !IOS && DEV ? true : useRN
const _useRN = useRN
const passProps = {
/** @todo 安卓开发环境热使用 RNGH 的组件会导致 GestureHandler already initialized 问题, 暂时规避 */
useRN: _useRN,
Expand Down
29 changes: 15 additions & 14 deletions src/components/touchable/touchable-animated.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: czy0729
* @Date: 2023-02-28 16:46:44
* @Last Modified by: czy0729
* @Last Modified time: 2023-03-02 17:19:01
* @Last Modified time: 2023-03-03 00:09:06
*/
import React, { useRef, useCallback } from 'react'
import { Animated, Easing } from 'react-native'
Expand Down Expand Up @@ -126,25 +126,26 @@ function TouchableAnimated({
return (
<GenericTouchable
{...other}
style={[
style,
{
opacity: opacityRef.current
}
]}
delayPressIn={delay}
delayPressOut={delay}
onStateChange={onStateChange}
onPress={_onPress}
>
<Animated.View
style={{
transform: [
{
scale: scaleRef.current
}
]
}}
style={[
style,
{
opacity: opacityRef.current
},
{
transform: [
{
scale: scaleRef.current
}
],
overflow: 'hidden'
}
]}
>
{children}
</Animated.View>
Expand Down
24 changes: 14 additions & 10 deletions src/screens/_/item/timeline/images/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
* @Author: czy0729
* @Date: 2022-11-11 19:53:43
* @Last Modified by: czy0729
* @Last Modified time: 2022-11-11 19:57:45
* @Last Modified time: 2023-03-03 01:12:50
*/
import React from 'react'
import { ScrollView, View } from 'react-native'
import { Flex } from '@components'
import { Touchable, Flex } from '@components'
import { _ } from '@stores'
import { findSubjectCn } from '@utils'
import { ob } from '@utils/decorators'
Expand All @@ -23,13 +23,8 @@ function Images({ type, image, p3Text, p3Url, onNavigate }) {
const isAvatar = !String(!!p3Url.length && p3Url[0]).includes('subject')
return (
<View key={item || index} style={type ? _.mr.md : _.mr.sm}>
<Cover
src={item}
size={isAvatar ? AVATAR_COVER_WIDTH : IMG_WIDTH_SM}
height={isAvatar ? AVATAR_COVER_WIDTH : IMG_HEIGHT_SM}
radius
shadow
type={type}
<Touchable
animate
onPress={() => {
const url = (!!p3Url.length && p3Url[index]) || ''
const subjectId = matchSubjectId(url)
Expand All @@ -41,7 +36,16 @@ function Images({ type, image, p3Text, p3Url, onNavigate }) {
_type: type
})
}}
/>
>
<Cover
src={item}
size={isAvatar ? AVATAR_COVER_WIDTH : IMG_WIDTH_SM}
height={isAvatar ? AVATAR_COVER_WIDTH : IMG_HEIGHT_SM}
radius
shadow
type={type}
/>
</Touchable>
</View>
)
})
Expand Down
10 changes: 1 addition & 9 deletions src/screens/home/v2/grid-info/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
* @Author: czy0729
* @Date: 2019-10-19 21:28:24
* @Last Modified by: czy0729
* @Last Modified time: 2023-01-18 02:39:59
* @Last Modified time: 2023-03-02 23:05:58
*/
import React from 'react'
import { View } from 'react-native'
import { Flex } from '@components'
// import { OnairProgress } from '@_'
import { _ } from '@stores'
import { obc } from '@utils/decorators'
import { t } from '@utils/fetch'
Expand Down Expand Up @@ -60,13 +59,6 @@ function GridInfo(
</Flex.Item>
<ToolBar subjectId={subjectId} subject={subject} />
</Flex>
{/* <OnairProgress
key={subjectId}
epStatus={epStatus}
current={$.currentOnAir(subjectId)}
total={$.epsCount(subjectId)}
height={6}
/> */}
<Eps subjectId={subjectId} />
</Flex.Item>
{isTop && <View style={styles.dot} />}
Expand Down
5 changes: 3 additions & 2 deletions src/screens/home/v2/item/eps/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: czy0729
* @Date: 2021-01-21 14:11:56
* @Last Modified by: czy0729
* @Last Modified time: 2022-10-25 14:48:08
* @Last Modified time: 2023-03-02 23:06:47
*/
import React from 'react'
import { View } from 'react-native'
Expand All @@ -22,10 +22,11 @@ function Eps({ subjectId, isFirst }, { $, navigation }: Ctx) {
subjectId={subjectId}
eps={$.eps(subjectId)}
userProgress={$.userProgress(subjectId)}
flip={$.state.flip === subjectId}
onFliped={$.afterFlipEps}
onSelect={(value, item: any) =>
$.doEpsSelect(value, item, subjectId, navigation)
}
// onLongPress={(item: any) => $.doEpsLongPress(item, subjectId)}
/>
{isFirst && (
<>
Expand Down
30 changes: 22 additions & 8 deletions src/screens/home/v2/store/action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: czy0729
* @Date: 2023-02-27 20:23:04
* @Last Modified by: czy0729
* @Last Modified time: 2023-02-27 22:11:48
* @Last Modified time: 2023-03-02 23:09:27
*/
import { collectionStore, userStore } from '@stores'
import {
Expand Down Expand Up @@ -357,6 +357,20 @@ export default class Action extends Fetch {
}
}

/** Eps 状态按钮做动画前, 需要先设置开启 */
prepareEpsFlip = (subjectId: SubjectId) => {
this.setState({
flip: subjectId
})
}

/** Eps 状态按钮完全动画后, 需要设置关闭才能做下一次动画 */
afterFlipEps = debounce(() => {
this.setState({
flip: 0
})
})

/** -------------------- action -------------------- */
/** 观看下一章节 */
doWatchedNextEp = async (subjectId: SubjectId) => {
Expand All @@ -378,6 +392,8 @@ export default class Action extends Fetch {
subjectId
})

this.prepareEpsFlip(subjectId)

const { id } = this.nextWatchEp(subjectId)
await userStore.doUpdateEpStatus({
id,
Expand All @@ -392,8 +408,6 @@ export default class Action extends Fetch {
}
}
})
feedback()

userStore.fetchCollectionSingle(subjectId)
this.fetchUserProgress(subjectId)
}
Expand Down Expand Up @@ -477,13 +491,13 @@ export default class Action extends Fetch {
status
})

this.prepareEpsFlip(subjectId)

// 更新收视进度
await userStore.doUpdateEpStatus({
id: item.id,
status
})
feedback()

userStore.fetchCollectionSingle(subjectId)
this.fetchUserProgress(subjectId)
}
Expand All @@ -508,17 +522,17 @@ export default class Action extends Fetch {
sort = eps.findIndex(i => i.sort === item.sort)
}

this.prepareEpsFlip(subjectId)

await userStore.doUpdateSubjectWatched({
subjectId,
sort: sort === -1 ? item.sort : sort + 1
})
feedback()

userStore.fetchCollectionSingle(subjectId)
this.fetchUserProgress(subjectId)
}

// iOS是本集讨论, 安卓是(+N)...
// iOS 是本集讨论, 安卓是 (+N)...
if (value.includes('本集讨论') || value.includes('(+')) {
t('首页.章节菜单操作', {
title: '本集讨论',
Expand Down
5 changes: 3 additions & 2 deletions src/screens/home/v2/store/ds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: czy0729
* @Date: 2023-02-27 20:13:43
* @Last Modified by: czy0729
* @Last Modified time: 2023-02-27 22:15:53
* @Last Modified time: 2023-03-02 23:04:01
*/
import { ExcludeState, State, InitItem } from '../types'

Expand Down Expand Up @@ -37,7 +37,8 @@ export const EXCLUDE_STATE: ExcludeState = {
filter: '',
filterPage: -1,
isFocused: true,
renderedTabsIndex: []
renderedTabsIndex: [],
flip: 0
}

/** state */
Expand Down
Loading

0 comments on commit 9de9530

Please sign in to comment.