Skip to content

Commit 44ec608

Browse files
committed
Merge branch 'main' of github.com:Muxi-X/ccnubox_rn
2 parents 3d304da + a0c81b7 commit 44ec608

6 files changed

Lines changed: 34 additions & 15 deletions

File tree

src/app/(setting)/checkUpdate.tsx

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -79,18 +79,23 @@ function CheckUpdate(): React.ReactNode {
7979
style={[styles.updateButton, currentStyle?.button_style]}
8080
onPress={() => {
8181
setLoading(true);
82-
Updates.checkForUpdateAsync()
83-
.then(res => {
84-
if (!res.isAvailable) {
85-
Toast.show({ text: '已是最新版', icon: 'success' });
86-
}
87-
})
88-
.catch(err => {
89-
Toast.show({ text: err.toString() });
90-
})
91-
.finally(() => {
92-
setLoading(false);
93-
});
82+
if (__DEV__) {
83+
Toast.show({ text: '已是最新版', icon: 'success' });
84+
setLoading(false);
85+
} else {
86+
Updates.checkForUpdateAsync()
87+
.then(res => {
88+
if (!res.isAvailable) {
89+
Toast.show({ text: '已是最新版', icon: 'success' });
90+
}
91+
})
92+
.catch(err => {
93+
Toast.show({ text: err.toString() });
94+
})
95+
.finally(() => {
96+
setLoading(false);
97+
});
98+
}
9499
}}
95100
isLoading={loading}
96101
>

src/app/_layout.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ export default function RootLayout() {
5050
// 配置Toast
5151
Toast.config({ mask: false, stackable: true });
5252
// 获取更新
53-
fetchUpdate();
53+
if (!__DEV__) {
54+
fetchUpdate();
55+
}
5456
// 在 store 中设置爬虫 ref
5557
setRef(scraperRef as React.RefObject<WebView>);
5658
// 在 store 中配置 portal ref

src/assets/icons/screenshot.svg

Lines changed: 7 additions & 1 deletion
Loading

src/components/skeleton/index.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ const SkeletonLoader: FC<SkeletonType> = ({
4646
globalEventBus.on('request_complete', () => {
4747
if (isFocused) setLoading(false);
4848
});
49+
setTimeout(() => {
50+
setLoading(false);
51+
}, 5000);
4952
}, []);
5053
React.useEffect(() => {
5154
if (layout)

src/modules/courseTable/components/ScheduleHeader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export const ScheduleHeaderRight: React.FC = () => {
106106
globalEventBus.emit('SaveImageShot');
107107
}}
108108
>
109-
<ScreenShotIcon color={currentStyle?.text_style?.color} />
109+
<ScreenShotIcon color={currentStyle?.text_style?.color} width={24} />
110110
</TouchableOpacity>
111111
{/* <MaterialIcons
112112
name="delete-sweep"

src/modules/courseTable/components/weekSelector/index.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,12 @@ const WeekSelector: FC<WeekSelectorProps> = ({
7676
{
7777
position: 'absolute',
7878
bottom: -12,
79+
width: 31,
80+
overflow: 'visible',
7981
color: '#7878F8',
8082
},
8183
]}
84+
numberOfLines={1}
8285
>
8386
当前周
8487
</Text>

0 commit comments

Comments
 (0)