diff --git a/frontend/public/version.txt b/frontend/public/version.txt index 73462a5..e70b452 100644 --- a/frontend/public/version.txt +++ b/frontend/public/version.txt @@ -1 +1 @@ -2.5.1 +2.6.0 diff --git a/frontend/src/store.ts b/frontend/src/store.ts index 74f7690..5806079 100644 --- a/frontend/src/store.ts +++ b/frontend/src/store.ts @@ -1,6 +1,6 @@ import { create } from "zustand"; -export const recently = 1000 * 60 * 15; +export const recently = 1000 * 60 * 50; function isOnline(lastSync: Date, lastSeen?: Date): boolean { if (!lastSeen) return false; @@ -118,7 +118,9 @@ export const useStore = create()((set) => ({ if (online1 > online2) { return -1; } - if ((b1.name || b1.addr) < (b2.name || b2.addr)) { + const name1 = (b1.name || b1.addr).toLowerCase(); + const name2 = (b2.name || b2.addr).toLowerCase(); + if (name1 < name2) { return -1; } return 1; diff --git a/src/main.go b/src/main.go index 5d5125a..185c9af 100644 --- a/src/main.go +++ b/src/main.go @@ -54,7 +54,7 @@ func onBotStart(cli *botcli.BotCli, bot *deltachat.Bot, cmd *cobra.Command, args func updateOfflineBotsStatusLoop(rpc *deltachat.Rpc) { logger := cli.Logger.With("origin", "off-bots-status-loop") - delay := 60 * time.Minute + delay := 120 * time.Minute for { toSleep := delay - time.Since(cfg.OffLastChecked) if toSleep > 0 { @@ -94,7 +94,7 @@ func updateOfflineBotsStatusLoop(rpc *deltachat.Rpc) { logger.Error(err) continue } - if time.Since(contact.LastSeen.Time).Minutes() < 30 { + if time.Since(contact.LastSeen.Time).Minutes() < 60 { // bot is not offline, it will be checked by the online-bots status loop continue } @@ -108,7 +108,7 @@ func updateOfflineBotsStatusLoop(rpc *deltachat.Rpc) { func updateStatusLoop(rpc *deltachat.Rpc) { logger := cli.Logger.With("origin", "status-loop") - delay := 10 * time.Minute + delay := 30 * time.Minute for { toSleep := delay - time.Since(cfg.StatusLastChecked) if toSleep > 0 { @@ -122,7 +122,7 @@ func updateStatusLoop(rpc *deltachat.Rpc) { if botsData.Hash == "" { delay = 10 * time.Second } else { - delay = 10 * time.Minute + delay = 30 * time.Minute } selfAddrs := getSelfAddrs(rpc) accId := getFirstAccount(rpc) @@ -151,7 +151,7 @@ func updateStatusLoop(rpc *deltachat.Rpc) { logger.Error(err) continue } - if time.Since(contact.LastSeen.Time).Minutes() >= 30 { + if time.Since(contact.LastSeen.Time).Minutes() >= 60 { // offline bot, will be check by the offline-bots status loop continue }