format code
This commit is contained in:
+5
-4
@@ -42,11 +42,13 @@ func createTab(jid string, isMuc bool, name string) bool {
|
||||
newTab := new(chatTab)
|
||||
newTab.isMuc = isMuc
|
||||
newTab.msgs = gtk.NewListBox()
|
||||
newTab.msgs.SetVExpand(true)
|
||||
newTab.msgs.SetShowSeparators(true)
|
||||
glib.IdleAdd(func() {
|
||||
newTab.msgs.SetVExpand(true)
|
||||
newTab.msgs.SetShowSeparators(true)
|
||||
newTab.msgs.Append(gtk.NewButtonWithLabel(loadedLocale["getPastMessages"]))
|
||||
})
|
||||
newTab.name = name
|
||||
|
||||
newTab.msgs.Append(gtk.NewButtonWithLabel(loadedLocale["getPastMessages"]))
|
||||
tabs.Store(jid, newTab)
|
||||
return true
|
||||
}
|
||||
@@ -215,7 +217,6 @@ func switchToTab(jid string, w *gtk.Window) {
|
||||
medal.SetHExpand(true)
|
||||
userbox.Append(medal)
|
||||
|
||||
|
||||
default_av := createIdenticon(u.From, false)
|
||||
userbox.Prepend(default_av)
|
||||
var vcu VCardUpdate
|
||||
|
||||
+2
-3
@@ -12,12 +12,12 @@ import (
|
||||
"github.com/google/uuid"
|
||||
"github.com/jasonlovesdoggo/gopen"
|
||||
"gosrc.io/xmpp/stanza"
|
||||
xmpp_color "mellium.im/xmpp/color"
|
||||
"mellium.im/xmpp/jid"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
xmpp_color "mellium.im/xmpp/color"
|
||||
)
|
||||
|
||||
func generatePresenceWidget(p stanza.Packet) gtk.Widgetter {
|
||||
@@ -127,7 +127,7 @@ func generateMessageWidget(p stanza.Packet) gtk.Widgetter {
|
||||
enter_custom.SetHExpand(true)
|
||||
enter_custom.ConnectClicked(func() {
|
||||
|
||||
client.SendRaw(fmt.Sprintf(`
|
||||
client.SendRaw(fmt.Sprintf(`
|
||||
<message from='%s' to='%s' id='%s' type='%s'>
|
||||
<reactions id='%s' xmlns='urn:xmpp:reactions:0'>
|
||||
<reaction>%s</reaction>
|
||||
@@ -138,7 +138,6 @@ func generateMessageWidget(p stanza.Packet) gtk.Widgetter {
|
||||
rc_box.Append(custom)
|
||||
rc_box.Append(enter_custom)
|
||||
|
||||
|
||||
quote := gtk.NewButtonWithLabel("Quote")
|
||||
quote.ConnectClicked(func() {
|
||||
lines := strings.Split(m.Body, "\n")
|
||||
|
||||
@@ -2,9 +2,9 @@ package main
|
||||
|
||||
import (
|
||||
"github.com/diamondburned/gotk4/pkg/gtk/v4"
|
||||
"gosrc.io/xmpp/stanza"
|
||||
"mellium.im/xmpp/color"
|
||||
"sync"
|
||||
"gosrc.io/xmpp/stanza"
|
||||
)
|
||||
|
||||
type chatTab struct {
|
||||
@@ -27,7 +27,7 @@ type lambdaConfig struct {
|
||||
Identicons bool
|
||||
Debug bool
|
||||
ShowPresenceUpdates bool
|
||||
CompactMode bool
|
||||
CompactMode bool
|
||||
CustomNicks map[string]string
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ import (
|
||||
|
||||
type Ping struct {
|
||||
stanza.IQ
|
||||
XMLName xml.Name `xml:"urn:xmpp:ping ping"`
|
||||
XMLName xml.Name `xml:"urn:xmpp:ping ping"`
|
||||
ResultSet *stanza.ResultSet `xml:"set,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@@ -51,4 +51,3 @@ func init() {
|
||||
stanza.TypeRegistry.MapExtension(stanza.PKTIQ, xml.Name{Space: "vcard-temp", Local: "vCard"}, VCard{})
|
||||
stanza.TypeRegistry.MapExtension(stanza.PKTPresence, xml.Name{Space: "vcard-temp:x:update", Local: "x"}, VCardUpdate{})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user