diff --git a/App.android.tsx b/App.android.tsx index ad797a04f..4d7e9a33f 100755 --- a/App.android.tsx +++ b/App.android.tsx @@ -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' diff --git a/README.MD b/README.MD index 0ee04cf2d..4db67c263 100755 --- a/README.MD +++ b/README.MD @@ -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) diff --git a/app.json b/app.json index 782cf5393..053be5549 100755 --- a/app.json +++ b/app.json @@ -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", diff --git a/config.ts b/config.ts index d1441ca84..134c95ad2 100755 --- a/config.ts +++ b/config.ts @@ -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' @@ -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 diff --git a/src/components/blur-view/styles.ts b/src/components/blur-view/styles.ts index ac72d0d38..31de29692 100644 --- a/src/components/blur-view/styles.ts +++ b/src/components/blur-view/styles.ts @@ -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' @@ -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)' } }) diff --git a/src/components/render-html/toggle-image/styles.ts b/src/components/render-html/toggle-image/styles.ts index 9f7c63e44..9105c05d1 100644 --- a/src/components/render-html/toggle-image/styles.ts +++ b/src/components/render-html/toggle-image/styles.ts @@ -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: { diff --git a/src/components/touchable/index.tsx b/src/components/touchable/index.tsx index b4eccd235..eabb27c3a 100755 --- a/src/components/touchable/index.tsx +++ b/src/components/touchable/index.tsx @@ -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' @@ -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, diff --git a/src/components/touchable/touchable-animated.tsx b/src/components/touchable/touchable-animated.tsx index 01e53d4a0..c006cb933 100644 --- a/src/components/touchable/touchable-animated.tsx +++ b/src/components/touchable/touchable-animated.tsx @@ -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' @@ -126,25 +126,26 @@ function TouchableAnimated({ return ( {children} diff --git a/src/screens/_/item/timeline/images/index.tsx b/src/screens/_/item/timeline/images/index.tsx index 5dec7f31a..40b0be4a1 100644 --- a/src/screens/_/item/timeline/images/index.tsx +++ b/src/screens/_/item/timeline/images/index.tsx @@ -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' @@ -23,13 +23,8 @@ function Images({ type, image, p3Text, p3Url, onNavigate }) { const isAvatar = !String(!!p3Url.length && p3Url[0]).includes('subject') return ( - { const url = (!!p3Url.length && p3Url[index]) || '' const subjectId = matchSubjectId(url) @@ -41,7 +36,16 @@ function Images({ type, image, p3Text, p3Url, onNavigate }) { _type: type }) }} - /> + > + + ) }) diff --git a/src/screens/home/v2/grid-info/index.tsx b/src/screens/home/v2/grid-info/index.tsx index d699f9d00..0facc6b49 100755 --- a/src/screens/home/v2/grid-info/index.tsx +++ b/src/screens/home/v2/grid-info/index.tsx @@ -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' @@ -60,13 +59,6 @@ function GridInfo( - {/* */} {isTop && } diff --git a/src/screens/home/v2/item/eps/index.tsx b/src/screens/home/v2/item/eps/index.tsx index a83d48811..08633745a 100755 --- a/src/screens/home/v2/item/eps/index.tsx +++ b/src/screens/home/v2/item/eps/index.tsx @@ -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' @@ -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 && ( <> diff --git a/src/screens/home/v2/store/action.ts b/src/screens/home/v2/store/action.ts index 69f4c5f39..daf2dfc1d 100644 --- a/src/screens/home/v2/store/action.ts +++ b/src/screens/home/v2/store/action.ts @@ -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 { @@ -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) => { @@ -378,6 +392,8 @@ export default class Action extends Fetch { subjectId }) + this.prepareEpsFlip(subjectId) + const { id } = this.nextWatchEp(subjectId) await userStore.doUpdateEpStatus({ id, @@ -392,8 +408,6 @@ export default class Action extends Fetch { } } }) - feedback() - userStore.fetchCollectionSingle(subjectId) this.fetchUserProgress(subjectId) } @@ -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) } @@ -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: '本集讨论', diff --git a/src/screens/home/v2/store/ds.ts b/src/screens/home/v2/store/ds.ts index 00d39ae5e..ecabba270 100644 --- a/src/screens/home/v2/store/ds.ts +++ b/src/screens/home/v2/store/ds.ts @@ -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' @@ -37,7 +37,8 @@ export const EXCLUDE_STATE: ExcludeState = { filter: '', filterPage: -1, isFocused: true, - renderedTabsIndex: [] + renderedTabsIndex: [], + flip: 0 } /** state */ diff --git a/src/screens/home/v2/types.ts b/src/screens/home/v2/types.ts index 2b4cf3074..9bd173c71 100644 --- a/src/screens/home/v2/types.ts +++ b/src/screens/home/v2/types.ts @@ -2,7 +2,7 @@ * @Author: czy0729 * @Date: 2022-07-11 16:50:05 * @Last Modified by: czy0729 - * @Last Modified time: 2023-02-27 22:15:51 + * @Last Modified time: 2023-03-02 23:04:12 */ import { factory } from '@utils' import { Loaded, Navigation, Subject, SubjectId } from '@types' @@ -40,6 +40,7 @@ export type ExcludeState = { filterPage: number isFocused: boolean renderedTabsIndex: number[] + flip: SubjectId } export type State = { diff --git a/web/CHANGELOG.MD b/web/CHANGELOG.MD index a69142798..7ac1391e2 100755 --- a/web/CHANGELOG.MD +++ b/web/CHANGELOG.MD @@ -1,5 +1,21 @@ # CHANGELOG +v7.9.0 - 2023/03/03 + +—— 优化 —— + +- [x] [系统] 点击跳转相关交互,都追加了触摸后反馈动画 +- [x] [进度、条目] 收藏状态和章节按钮状态转变后,增加了小动画 (后续版本应该会把动画是否开启作为一个配置项) +- [x] [帖子] 回复楼层时, 会把楼层的部分正文在输入框 placeholder 里显示 +- [x] [帖子] 回复框中常用 bgm 表情选择后不会改变常用的排序 +- [x] [进度] 收藏管理框,吐槽输入框增加恢复历史的按钮 +- [x] [SMB] 功能迭代(改善了一点用法,更方便) +- [x] [电波提醒] 优化了切换时头像闪一下的问题 + +—— 修复 —— + +- [x] [进度] 修复了在刷新条目信息时, 有概率卡死程序的问题 + v7.8.0 - 2023/02/15 —— 新增 —— diff --git a/web/package.android.json b/web/package.android.json index 201f2e004..027a2c612 100755 --- a/web/package.android.json +++ b/web/package.android.json @@ -77,7 +77,7 @@ "react-native-expo-image-cache": "4.1.0", "react-native-fast-image": "8.5.11", "react-native-fs": "2.18.0", - "react-native-gesture-handler": "1.10.2", + "react-native-gesture-handler": "2.3.2", "react-native-hold-menu": "0.1.1", "react-native-image-zoom-viewer": "2.2.26", "react-native-modal-popover": "0.0.12", @@ -101,6 +101,7 @@ "@types/react": "16.9.35", "react": "17.0.2", "react-native": "0.66.4", + "react-native-gesture-handler": "2.3.2", "react-native-safe-area-view": "1.1.1" }, "devDependencies": {