Fix some crashes and use forked oasisSdk
This commit is contained in:
11
main.go
11
main.go
@@ -33,7 +33,7 @@ import (
|
||||
"mellium.im/xmpp/bookmarks"
|
||||
"mellium.im/xmpp/jid"
|
||||
"mellium.im/xmpp/muc"
|
||||
oasisSdk "pain.agency/oasis-sdk"
|
||||
oasisSdk "github.com/sunglocto/oasis-sdk"
|
||||
// TODO: integrated theme switcher
|
||||
)
|
||||
|
||||
@@ -171,6 +171,8 @@ func CreateUITab(chatJidStr string) ChatTabUI {
|
||||
replytext.Hide()
|
||||
replytext.Importance = widget.SuccessImportance
|
||||
replytext.Selectable = true
|
||||
// replytext.Wrapping = fyne.TextWrapWord
|
||||
replytext.Truncation = fyne.TextTruncateEllipsis
|
||||
btn := widget.NewButtonWithIcon("View media", icon, func() {
|
||||
|
||||
})
|
||||
@@ -555,7 +557,7 @@ func main() {
|
||||
var ImageID string = ""
|
||||
mucJidStr := msg.From.Bare().String()
|
||||
if tab, ok := chatTabs[mucJidStr]; ok {
|
||||
chatInfo.Objects[0] = widget.NewLabel(fmt.Sprintf("[!] %s", mucJidStr))
|
||||
//chatInfo.Objects[0] = widget.NewLabel(fmt.Sprintf("[!] %s", mucJidStr))
|
||||
chatTabs[mucJidStr].Muc = muc
|
||||
str := *msg.CleanedBody
|
||||
if strings.Contains(str, login.DisplayName) {
|
||||
@@ -631,7 +633,10 @@ func main() {
|
||||
fyne.Do(func() {
|
||||
UITabs[mucJidStr].Scroller.Refresh()
|
||||
if scrollDownOnNewMessage {
|
||||
UITabs[mucJidStr].Scroller.ScrollToBottom()
|
||||
tab, ok := UITabs[mucJidStr]
|
||||
if ok {
|
||||
tab.Scroller.ScrollToBottom()
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user