Format code
This commit is contained in:
32
main.go
32
main.go
@@ -54,18 +54,18 @@ type Message struct {
|
||||
}
|
||||
|
||||
type ChatTab struct {
|
||||
Jid jid.JID
|
||||
Nick string
|
||||
Messages []Message
|
||||
isMuc bool
|
||||
Muc muc.Channel
|
||||
UpdateSidebar bool
|
||||
Jid jid.JID
|
||||
Nick string
|
||||
Messages []Message
|
||||
isMuc bool
|
||||
Muc muc.Channel
|
||||
UpdateSidebar bool
|
||||
}
|
||||
|
||||
type ChatTabUI struct {
|
||||
Internal *ChatTab
|
||||
Scroller *widget.List `xml:"-"`
|
||||
Sidebar *fyne.Container `xml:"-"`
|
||||
Scroller *widget.List `xml:"-"`
|
||||
Sidebar *fyne.Container `xml:"-"`
|
||||
}
|
||||
|
||||
type piConfig struct {
|
||||
@@ -201,8 +201,6 @@ func CreateUITab(chatJidStr string) ChatTabUI {
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
|
||||
scroller.OnSelected = func(id widget.ListItemID) {
|
||||
selectedId = id
|
||||
}
|
||||
@@ -224,10 +222,10 @@ func addChatTab(isMuc bool, chatJid jid.JID, nick string) {
|
||||
}
|
||||
|
||||
myChatTab := ChatTab{
|
||||
Jid: chatJid,
|
||||
Nick: nick,
|
||||
Messages: []Message{},
|
||||
isMuc: isMuc,
|
||||
Jid: chatJid,
|
||||
Nick: nick,
|
||||
Messages: []Message{},
|
||||
isMuc: isMuc,
|
||||
}
|
||||
|
||||
myUITab := CreateUITab(chatJid.String())
|
||||
@@ -655,7 +653,6 @@ func main() {
|
||||
}, w)
|
||||
})
|
||||
|
||||
|
||||
jtb := fyne.NewMenuItem("jump to bottom", func() {
|
||||
selectedScroller, ok := AppTabs.Selected().Content.(*widget.List)
|
||||
if !ok {
|
||||
@@ -707,7 +704,7 @@ func main() {
|
||||
})
|
||||
|
||||
//deb := fyne.NewMenuItem("DEBUG: Attempt to get MAM history from a user", func() {
|
||||
//res, err := history.Fetch(client.Ctx, history.Query{}, jid.MustParse("ringen@muc.isekai.rocks"), client.Session)
|
||||
//res, err := history.Fetch(client.Ctx, history.Query{}, jid.MustParse("ringen@muc.isekai.rocks"), client.Session)
|
||||
//})
|
||||
mic := fyne.NewMenuItem("upload a file", func() {
|
||||
var link string
|
||||
@@ -790,7 +787,6 @@ func main() {
|
||||
}, w)
|
||||
})
|
||||
|
||||
|
||||
savedata := fyne.NewMenuItem("DEBUG: Save tab data to disk", func() {
|
||||
d := []ChatTab{}
|
||||
for _, v := range chatTabs {
|
||||
@@ -911,8 +907,6 @@ func main() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
tab := chatTabs[activeChatJid]
|
||||
UITab := UITabs[activeChatJid]
|
||||
if tab.isMuc {
|
||||
|
Reference in New Issue
Block a user