t
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user