mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-22 11:05:17 +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(() => {
|
||||
showPlotConfig.value = props.plotConfigModal;
|
||||
if (botStore.activeBot.selectedPair) {
|
||||
|
|
|
@ -352,7 +352,8 @@ export function createBotSubStore(botId: string, botName: string) {
|
|||
this.candleDataStatus = LoadingStatus.loading;
|
||||
try {
|
||||
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
|
||||
const { data } = await api.post<PairCandlePayload, AxiosResponse<PairHistory>>(
|
||||
'/pair_candles',
|
||||
|
@ -381,7 +382,7 @@ export function createBotSubStore(botId: string, botName: string) {
|
|||
this.candleDataStatus = LoadingStatus.error;
|
||||
}
|
||||
} else {
|
||||
// Error branch
|
||||
// Error branchs
|
||||
const error = 'pair or timeframe not specified';
|
||||
console.error(error);
|
||||
return new Promise((resolve, reject) => {
|
||||
|
|
Loading…
Reference in New Issue
Block a user