|
|
@@ -27,7 +27,7 @@ export default function IndexConsoleMuti(props: { status: string, event: string,
|
|
|
const [sleepEnd, setSleepEnd] = useState<any>(null)
|
|
|
const [showPicker, setShowPicker] = useState(false)
|
|
|
const [operateType, setOperateType] = useState('startFast')
|
|
|
- const [commitLoading,setCommitLoading] = useState(false)
|
|
|
+ const [commitLoading, setCommitLoading] = useState(false)
|
|
|
const pickerRef = useRef(null)
|
|
|
|
|
|
|
|
|
@@ -36,7 +36,7 @@ export default function IndexConsoleMuti(props: { status: string, event: string,
|
|
|
}
|
|
|
|
|
|
function confirm() {
|
|
|
- if (commitLoading){
|
|
|
+ if (commitLoading) {
|
|
|
return;
|
|
|
}
|
|
|
var fast: any = {}
|
|
|
@@ -278,10 +278,17 @@ export default function IndexConsoleMuti(props: { status: string, event: string,
|
|
|
setCommitLoading(false)
|
|
|
getLocalPush()
|
|
|
global.indexPageRefresh()
|
|
|
- if ((res as any).current_record.status == "WAIT_FOR_START"){
|
|
|
+ if ((res as any).current_record.status == "WAIT_FOR_START") {
|
|
|
global.scrollToLatest()
|
|
|
+ global.swiperDayNightRefresh()
|
|
|
+ if (global.refreshNight) {
|
|
|
+ global.refreshNight()
|
|
|
+ }
|
|
|
+ if (global.refreshDay) {
|
|
|
+ global.refreshDay()
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
global.refrehWeekly()
|
|
|
global.refreshStreaks()
|
|
|
if (props.event == 'end_fast')
|
|
|
@@ -518,7 +525,7 @@ export default function IndexConsoleMuti(props: { status: string, event: string,
|
|
|
<View className='btn_space' />
|
|
|
<View className='modal_btn' style={{ backgroundColor: color, flexDirection: 'row', alignItems: 'center', justifyContent: 'center', opacity: commitLoading ? 0.6 : 1 }} onClick={confirm}>
|
|
|
{
|
|
|
- commitLoading && <View style={{ display: 'flex', overflow: 'hidden', height: 20, marginRight: 5 }}><AtActivityIndicator mode="center" color="#000" /></View>
|
|
|
+ commitLoading && <View style={{ display: 'flex', overflow: 'hidden', height: 20, marginRight: 5 }}><AtActivityIndicator mode="center" color="#000" /></View>
|
|
|
}
|
|
|
|
|
|
<Text className='modal_confirm_text' style={{ color: '#000', fontWeight: 'bold' }}>{t('feature.common.picker_confirm_btn')}</Text>
|