This commit is contained in:
2026-05-08 06:56:51 +01:00
parent 9593e7c041
commit 9bbefbcea8
7 changed files with 80 additions and 40 deletions
+22 -20
View File
@@ -346,7 +346,7 @@ func main() {
if presence.Type != "unavailable" {
_, ok := typed_unit.Members.Load(id)
if !ok {
if !ok && loadedConfig.ShowPresenceUpdates {
glib.IdleAdd(func() {
b := gtk.NewBox(gtk.OrientationVertical, 0)
ba, ok := generatePresenceWidget(p).(*gtk.Box)
@@ -370,25 +370,27 @@ func main() {
typed_unit.Members.Store(id, presence)
} else {
typed_unit.Members.Delete(id)
glib.IdleAdd(func() {
b := gtk.NewBox(gtk.OrientationVertical, 0)
ba, ok := generatePresenceWidget(p).(*gtk.Box)
if ok {
b = ba
}
tab, ok := tabs.Load(muc)
typed_tab := tab.(*chatTab)
if ok {
typed_tab.msgs.Append(b)
if current == muc {
scrollToBottomAfterUpdate(scroller)
if loadedConfig.ShowPresenceUpdates {
glib.IdleAdd(func() {
b := gtk.NewBox(gtk.OrientationVertical, 0)
ba, ok := generatePresenceWidget(p).(*gtk.Box)
if ok {
b = ba
}
} else {
fmt.Println("Got message when the tab does not exist!")
}
})
tab, ok := tabs.Load(muc)
typed_tab := tab.(*chatTab)
if ok {
typed_tab.msgs.Append(b)
if current == muc {
scrollToBottomAfterUpdate(scroller)
}
} else {
fmt.Println("Got message when the tab does not exist!")
}
})
}
}
mucmembers.Store(muc, typed_unit)
@@ -510,7 +512,7 @@ func main() {
jid := v.Jid
if name == "" {
name = jid
name = jid
}
createTab(jid, false, name)