mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-10 10:21:55 +00:00
Prevent some odd Update calls if bot is not logged in
This commit is contained in:
parent
ea55ab606f
commit
9d42d2caba
|
@ -206,7 +206,7 @@ export function createBotSubStore(botId: string, botName: string) {
|
|||
userService.setAutoRefresh(newRefreshValue);
|
||||
},
|
||||
setIsBotOnline(isBotOnline: boolean) {
|
||||
if (!this.isBotOnline && isBotOnline) {
|
||||
if (!this.isBotOnline && isBotOnline && this.isBotLoggedIn) {
|
||||
// Bot just came online.
|
||||
// Refresh everything
|
||||
this.refreshRequired = true;
|
||||
|
|
|
@ -239,7 +239,7 @@ export const useBotStore = defineStore('ftbot-wrapper', {
|
|||
|
||||
const botStoreUpdates: Promise<BotState>[] = [];
|
||||
this.allBotStores.forEach((bot) => {
|
||||
if (bot.isBotOnline && !bot.botStatusAvailable) {
|
||||
if (bot.isBotLoggedIn && bot.isBotOnline && !bot.botStatusAvailable) {
|
||||
botStoreUpdates.push(bot.getState());
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user