mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-26 04:55:15 +00:00
Trigger candle reload if plotconfig changes in "reduced" mode
This commit is contained in:
parent
f9355790c8
commit
d51246d1d1
|
@ -229,6 +229,18 @@ watch(
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => plotStore.plotConfig,
|
||||||
|
() => {
|
||||||
|
// all plotstore.usedColumns are in the dataset
|
||||||
|
const hasAllColumns = plotStore.usedColumns.every((c) => datasetColumns.value.includes(c));
|
||||||
|
if (!props.historicView && settingsStore.useReducedPairCalls && !hasAllColumns) {
|
||||||
|
console.log('triggering refresh');
|
||||||
|
refresh();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
showPlotConfig.value = props.plotConfigModal;
|
showPlotConfig.value = props.plotConfigModal;
|
||||||
if (botStore.activeBot.selectedPair) {
|
if (botStore.activeBot.selectedPair) {
|
||||||
|
|
|
@ -352,7 +352,8 @@ export function createBotSubStore(botId: string, botName: string) {
|
||||||
this.candleDataStatus = LoadingStatus.loading;
|
this.candleDataStatus = LoadingStatus.loading;
|
||||||
try {
|
try {
|
||||||
let result: PairHistory | null = null;
|
let result: PairHistory | null = null;
|
||||||
if (this.botApiVersion >= 2.35) {
|
const settingsStore = useSettingsStore();
|
||||||
|
if (this.botApiVersion >= 2.35 && settingsStore.useReducedPairCalls) {
|
||||||
// Modern approach, allowing filtering of columns
|
// Modern approach, allowing filtering of columns
|
||||||
const { data } = await api.post<PairCandlePayload, AxiosResponse<PairHistory>>(
|
const { data } = await api.post<PairCandlePayload, AxiosResponse<PairHistory>>(
|
||||||
'/pair_candles',
|
'/pair_candles',
|
||||||
|
@ -381,7 +382,7 @@ export function createBotSubStore(botId: string, botName: string) {
|
||||||
this.candleDataStatus = LoadingStatus.error;
|
this.candleDataStatus = LoadingStatus.error;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Error branch
|
// Error branchs
|
||||||
const error = 'pair or timeframe not specified';
|
const error = 'pair or timeframe not specified';
|
||||||
console.error(error);
|
console.error(error);
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user