From b7e2fb6e20af9a83f8b5d9514acd0e61b7d07a7b Mon Sep 17 00:00:00 2001
From: czy0729 <402731062@qq.com>
Date: Tue, 18 Jun 2019 21:26:06 +0800
Subject: [PATCH] =?UTF-8?q?v0.6.1=20-=20[x]=20=E4=BF=AE=E5=A4=8D=E4=BA=86?=
=?UTF-8?q?=E5=AE=89=E5=8D=93=E6=96=87=E5=AD=97=E6=98=BE=E7=A4=BA=E4=B8=8D?=
=?UTF-8?q?=E5=85=A8=E7=9A=84=E9=97=AE=E9=A2=98=20-=20[x]=20=E4=BF=AE?=
=?UTF-8?q?=E5=A4=8D=E4=BA=86bgm=E8=A1=A8=E6=83=85=E7=9C=8B=E4=B8=8D?=
=?UTF-8?q?=E5=85=A8=E7=9A=84=E9=97=AE=E9=A2=98=20-=20[x]=20=E6=B7=BB?=
=?UTF-8?q?=E5=8A=A0=E4=BA=86=E5=B8=96=E5=AD=90=E5=B1=95=E5=BC=80=E5=BC=95?=
=?UTF-8?q?=E7=94=A8=E7=9A=84=E8=AE=BE=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
CHANGELOG.MD | 8 +++++++-
components/button.js | 14 ++++++++++++--
components/render-html.js | 15 ++++++++-------
components/text.js | 19 ++++++++++++-------
constants/index.js | 4 ++--
navigations.js | 4 ++--
screens/_/eps.js | 4 ++--
screens/setting/index.js | 10 ++++++++--
screens/subject/book-ep.js | 5 +++--
screens/subject/tags.js | 7 ++++---
screens/topic/item.js | 2 +-
stores/system.js | 18 +++++++++++++++++-
styles/index.js | 4 ++--
13 files changed, 80 insertions(+), 34 deletions(-)
diff --git a/CHANGELOG.MD b/CHANGELOG.MD
index 3b2dc93b5..6815c1d8c 100644
--- a/CHANGELOG.MD
+++ b/CHANGELOG.MD
@@ -1,4 +1,10 @@
-##CHANGELOG
+## CHANGELOG
+
+v0.6.1 - 2019/06/18
+
+- [x] 修复了安卓文字显示不全的问题
+- [x] 修复了 bgm 表情看不全的问题
+- [x] 添加了帖子展开引用的设置
v0.6 - 2019/06/18
diff --git a/components/button.js b/components/button.js
index 5b2cda64f..194e77a87 100644
--- a/components/button.js
+++ b/components/button.js
@@ -2,7 +2,7 @@
* @Author: czy0729
* @Date: 2019-03-15 02:32:29
* @Last Modified by: czy0729
- * @Last Modified time: 2019-06-02 21:05:24
+ * @Last Modified time: 2019-06-18 20:53:57
*/
import React from 'react'
import { StyleSheet, View } from 'react-native'
@@ -54,7 +54,17 @@ const _Button = ({
)}
- {children}
+
+ {children}
+
)
if (onPress) {
diff --git a/components/render-html.js b/components/render-html.js
index fb4365053..9f274df75 100644
--- a/components/render-html.js
+++ b/components/render-html.js
@@ -4,11 +4,12 @@
* @Author: czy0729
* @Date: 2019-04-29 19:54:57
* @Last Modified by: czy0729
- * @Last Modified time: 2019-06-17 14:19:06
+ * @Last Modified time: 2019-06-18 20:22:32
*/
import React from 'react'
import { StyleSheet, View, Image as RNImage, Text } from 'react-native'
import HTML from 'react-native-render-html'
+import { systemStore } from '@stores'
import { open } from '@utils'
import { HOST } from '@constants'
import _ from '@styles'
@@ -108,8 +109,8 @@ export default class RenderHtml extends React.Component {
if (alt.indexOf('(bgm') !== -1) {
const index = parseInt(alt.replace(/\(bgm|\)/g, '')) - 23 // 偏移量
props.style = {
- width: 20,
- height: 20
+ width: 16,
+ height: 16
}
props.source =
parseInt(index) <= 100 ? bgm[index] : { uri: `${HOST}/${src}` }
@@ -142,7 +143,7 @@ export default class RenderHtml extends React.Component {
)}
{_bgmImagesTemp}
-
+ {' '}
)
}
@@ -290,7 +291,7 @@ class MaskText extends React.Component {
class QuoteText extends React.Component {
state = {
- show: false
+ show: systemStore.setting.quote || false
}
show = () =>
@@ -330,8 +331,8 @@ const styles = StyleSheet.create({
backgroundColor: _.colorDesc
},
quoteTextPlaceholder: {
- paddingBottom: 8,
- marginTop: -8,
+ paddingBottom: 10,
+ marginTop: -6,
color: _.colorSub,
textAlign: 'center'
},
diff --git a/components/text.js b/components/text.js
index 36d2b603a..fd5ea7b25 100644
--- a/components/text.js
+++ b/components/text.js
@@ -2,10 +2,11 @@
* @Author: czy0729
* @Date: 2019-03-15 06:11:55
* @Last Modified by: czy0729
- * @Last Modified time: 2019-06-17 01:28:52
+ * @Last Modified time: 2019-06-18 19:49:08
*/
import React from 'react'
import { StyleSheet, Text as RNText } from 'react-native'
+import { IOS } from '@constants'
import _ from '@styles'
const Text = ({
@@ -66,18 +67,22 @@ Text.defaultProps = {
export default Text
const styles = StyleSheet.create({
- text: {
- fontWeight: 'normal'
- },
+ text: IOS
+ ? {
+ fontWeight: 'normal'
+ }
+ : {},
alignCenter: {
textAlign: 'center'
},
alignRight: {
textAlign: 'right'
},
- bold: {
- fontWeight: 'bold'
- },
+ bold: IOS
+ ? {
+ fontWeight: 'bold'
+ }
+ : {},
10: _.fontSize(10),
11: _.fontSize(11),
12: _.fontSize(12),
diff --git a/constants/index.js b/constants/index.js
index 582839571..97a1c4e16 100644
--- a/constants/index.js
+++ b/constants/index.js
@@ -3,7 +3,7 @@
* @Author: czy0729
* @Date: 2019-02-22 01:25:31
* @Last Modified by: czy0729
- * @Last Modified time: 2019-06-18 01:11:33
+ * @Last Modified time: 2019-06-18 20:26:49
*/
import { Platform } from 'react-native'
import Constants from 'expo-constants'
@@ -30,7 +30,7 @@ export const GITHUB_URL = 'https://github.com/czy0729/Bangumi'
export const GITHUB_RELEASE_URL = `${GITHUB_URL}/releases`
export const GITHUB_RELEASE_REPOS_URL =
'https://api.github.com/repos/czy0729/Bangumi/releases'
-export const GITHUB_RELEASE_VERSION = '0.6-alpha' // since 20190618
+export const GITHUB_RELEASE_VERSION = '0.6.1-alpha' // since 20190618
// 图片
// 白
diff --git a/navigations.js b/navigations.js
index d0d977ce1..50a07a8d4 100644
--- a/navigations.js
+++ b/navigations.js
@@ -2,13 +2,13 @@
* @Author: czy0729
* @Date: 2019-06-02 14:42:28
* @Last Modified by: czy0729
- * @Last Modified time: 2019-06-18 00:35:07
+ * @Last Modified time: 2019-06-18 20:27:01
*/
export default {
initialRouteName: 'HomeTab' // HomeTab
// initialRouteParams: {
// subjectId: 18007, // 238923 100444 204135
- // topicId: 'group/346386', // ep/768491
+ // topicId: 'group/351138', // ep/768491
// userId: 419012,
// monoId: 'character/7454', // character/70323 person/5745
// type: 'anime',
diff --git a/screens/_/eps.js b/screens/_/eps.js
index 3d8749dae..8e7459eea 100644
--- a/screens/_/eps.js
+++ b/screens/_/eps.js
@@ -2,7 +2,7 @@
* @Author: czy0729
* @Date: 2019-03-15 02:19:02
* @Last Modified by: czy0729
- * @Last Modified time: 2019-06-08 22:12:22
+ * @Last Modified time: 2019-06-18 19:41:48
*/
import React from 'react'
import { StyleSheet, View } from 'react-native'
@@ -256,7 +256,7 @@ export default class Eps extends React.Component {
style={[
_style,
{
- marginBottom: -this.style.margin // 抵消最后一行的marginBottom
+ marginBottom: this.style.margin ? -this.style.margin : 0 // 抵消最后一行的marginBottom
}
]}
onLayout={this.onLayout}
diff --git a/screens/setting/index.js b/screens/setting/index.js
index 6f55fcd44..881df2a17 100644
--- a/screens/setting/index.js
+++ b/screens/setting/index.js
@@ -2,7 +2,7 @@
* @Author: czy0729
* @Date: 2019-05-24 01:34:26
* @Last Modified by: czy0729
- * @Last Modified time: 2019-06-14 22:08:23
+ * @Last Modified time: 2019-06-18 20:05:04
*/
import React from 'react'
import { ScrollView, AsyncStorage, Alert } from 'react-native'
@@ -81,7 +81,7 @@ class Setting extends React.Component {
}
render() {
- const { quality, cnFirst, autoFetch, speech } = systemStore.setting
+ const { quality, cnFirst, autoFetch, quote, speech } = systemStore.setting
const data = MODEL_SETTING_QUALITY.data.map(({ label }) => label)
const popoverProps = IOS
? {
@@ -129,6 +129,12 @@ class Setting extends React.Component {
}
withoutFeedback
/>
+ }
+ withoutFeedback
+ />
- {
{tags
.filter(item => !!item.name)
- .map(({ name, count }) => (
+ .map(({ name, count }, index) => (
{
navigation.push('Tag', {
diff --git a/screens/topic/item.js b/screens/topic/item.js
index 263ccc031..5f0045837 100644
--- a/screens/topic/item.js
+++ b/screens/topic/item.js
@@ -2,7 +2,7 @@
* @Author: czy0729
* @Date: 2019-04-30 18:47:12
* @Last Modified by: czy0729
- * @Last Modified time: 2019-06-18 00:38:17
+ * @Last Modified time: 2019-06-18 20:25:01
*/
import React from 'react'
import { StyleSheet, View } from 'react-native'
diff --git a/stores/system.js b/stores/system.js
index 2d09e0b94..f22645725 100644
--- a/stores/system.js
+++ b/stores/system.js
@@ -2,7 +2,7 @@
* @Author: czy0729
* @Date: 2019-05-17 21:53:14
* @Last Modified by: czy0729
- * @Last Modified time: 2019-06-18 11:04:08
+ * @Last Modified time: 2019-06-18 20:04:59
*/
import { NetInfo } from 'react-native'
import { observable, computed } from 'mobx'
@@ -17,6 +17,7 @@ const initSetting = {
quality: MODEL_SETTING_QUALITY.getValue('默认'), // 图片质量
cnFirst: true, // 是否中文优先
autoFetch: true, // 切换页面自动请求
+ quote: true, // 帖子展开引用
speech: true // Bangumi娘话语
}
const initRelease = {
@@ -172,6 +173,21 @@ class System extends store {
this.setStorage(key, undefined, namespace)
}
+ /**
+ * 切换`帖子展开引用`
+ */
+ switchQuote = () => {
+ const { quote } = this.setting
+ const key = 'setting'
+ this.setState({
+ [key]: {
+ ...this.setting,
+ quote: !quote
+ }
+ })
+ this.setStorage(key, undefined, namespace)
+ }
+
/**
* 切换`Bangumi娘话语`
*/
diff --git a/styles/index.js b/styles/index.js
index 73efe143a..5d60b26f1 100644
--- a/styles/index.js
+++ b/styles/index.js
@@ -3,7 +3,7 @@
* @Author: czy0729
* @Date: 2019-03-14 06:02:03
* @Last Modified by: czy0729
- * @Last Modified time: 2019-06-17 01:26:39
+ * @Last Modified time: 2019-06-18 19:53:29
*/
import { Dimensions, StyleSheet } from 'react-native'
import Constants from 'expo-constants'
@@ -53,7 +53,7 @@ export const colorDanger = 'rgb(232, 8, 13)'
export const colorWait = 'rgb(200, 200, 200)'
export const colorDisabled = 'rgb(150, 150, 150)'
export const colorBorder = 'rgb(222, 222, 222)'
-export const colorBg = 'rgb(248, 248, 248)'
+export const colorBg = 'rgb(240, 240, 240)'
export const colorPlaceholder = 'rgb(250, 250, 250)'
export const colorHighLight = 'rgba(0, 0, 0, 0.16)'
export const colorShadow = 'rgb(0, 0, 0)'