Add update check, upgrade dependencies and format code and change ver
This commit is contained in:
@@ -7,6 +7,8 @@ import (
|
||||
|
||||
"context"
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/diamondburned/gotk4/pkg/gdk/v4"
|
||||
"github.com/diamondburned/gotk4/pkg/gdkpixbuf/v2"
|
||||
"github.com/diamondburned/gotk4/pkg/gio/v2"
|
||||
@@ -16,18 +18,19 @@ import (
|
||||
"github.com/go-analyze/charts"
|
||||
"github.com/google/uuid"
|
||||
"golang.org/x/net/html/charset"
|
||||
"path/filepath"
|
||||
|
||||
"time"
|
||||
|
||||
"github.com/BurntSushi/toml"
|
||||
"gosrc.io/xmpp"
|
||||
"gosrc.io/xmpp/stanza"
|
||||
"time"
|
||||
|
||||
_ "embed"
|
||||
"encoding/xml"
|
||||
"github.com/kr/pretty"
|
||||
"io"
|
||||
"runtime"
|
||||
|
||||
"github.com/kr/pretty"
|
||||
)
|
||||
|
||||
var loadedConfig lambdaConfig
|
||||
@@ -310,7 +313,7 @@ func main() {
|
||||
}
|
||||
|
||||
if presence.Error.Reason != "" {
|
||||
beeep.Notify(fmt.Sprintf("%s : %s", presence.From, presence.Error.Reason), presence.Error.Text, cancelBytes)
|
||||
// beeep.Notify(fmt.Sprintf("%s : %s", presence.From, presence.Error.Reason), presence.Error.Text, cancelBytes)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -482,7 +485,7 @@ func main() {
|
||||
ic = clientAssets["car_high"]
|
||||
}
|
||||
|
||||
glib.IdleAdd(func() {
|
||||
glib.IdleAdd(func() {
|
||||
sStatus.SetText(fmt.Sprintf("%.2f%s", diff, loadedLocale["KBPerSecond"]))
|
||||
sIcon.SetFromPaintable(ic)
|
||||
})
|
||||
@@ -496,6 +499,17 @@ func main() {
|
||||
connectionStatus.SetText(fmt.Sprintf("%s%s", loadedLocale["connectedAs"], JidMustParse(clientroot.Session.BindJid).Bare()))
|
||||
connectionStatus.SetTooltipText(fmt.Sprintf("%s%s\n%s%t", loadedLocale["bindedJid"], clientroot.Session.BindJid, loadedLocale["usingTLS"], clientroot.Session.TlsEnabled))
|
||||
connectionIcon.SetFromPaintable(clientAssetsLoad("connect"))
|
||||
|
||||
if loadedConfig.CheckUpdate == "" {
|
||||
showInitialConsent()
|
||||
}
|
||||
|
||||
if loadedConfig.CheckUpdate == "yes" {
|
||||
err := updateCheck()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
})
|
||||
// Enable carbons
|
||||
client.SendRaw(fmt.Sprintf(
|
||||
|
||||
Reference in New Issue
Block a user