Several changes

This commit is contained in:
2026-01-30 10:40:38 +00:00
parent 1ef42695f0
commit 92b01844c4
9 changed files with 155 additions and 15 deletions

View File

@@ -4,6 +4,8 @@ import (
"github.com/diamondburned/gotk4/pkg/glib/v2"
"github.com/diamondburned/gotk4/pkg/gtk/v4"
"github.com/sqweek/dialog"
"gosrc.io/xmpp/stanza"
Jid "mellium.im/xmpp/jid"
)
func scrollToBottomAfterUpdate(scrolledWindow *gtk.ScrolledWindow) {
@@ -31,6 +33,19 @@ func createTab(jid string, isMuc bool) {
func switchToTab(jid string) {
current = jid
scroller.SetChild(tabs[current].msgs)
m, _ := mucmembers.Load(jid)
ma := m.(mucUnit)
mm := ma.Members
gen := gtk.NewBox(gtk.OrientationVertical, 0)
mm.Range(func(k, v any) bool {
u := v.(stanza.Presence)
gen.Append(gtk.NewLabel(Jid.MustParse(u.From).Resourcepart()))
return true
})
memberList.SetChild(gen)
}
func showErrorDialog(err error) {