Fix image uploading
This commit is contained in:
26
main.go
26
main.go
@@ -249,13 +249,13 @@ func CreateUITab(chatJidStr string) ChatTabUI {
|
|||||||
for i := len(chatTabs[chatJidStr].Messages) - 1; i >= 0; i-- {
|
for i := len(chatTabs[chatJidStr].Messages) - 1; i >= 0; i-- {
|
||||||
if reply.ID == chatTabs[chatJidStr].Messages[i].Raw.StanzaID.ID {
|
if reply.ID == chatTabs[chatJidStr].Messages[i].Raw.StanzaID.ID {
|
||||||
replytext.Show()
|
replytext.Show()
|
||||||
replytext.SetText(fmt.Sprintf(">%s", chatTabs[chatJidStr].Messages[i].Content))
|
replytext.SetText(fmt.Sprintf("↱ %s", chatTabs[chatJidStr].Messages[i].Content))
|
||||||
guy = chatTabs[chatJidStr].Messages[i].Author
|
guy = chatTabs[chatJidStr].Messages[i].Author
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
author.SetText(fmt.Sprintf("%s > %s", chatTabs[chatJidStr].Messages[i].Author, guy))
|
author.SetText(fmt.Sprintf("%s → %s", chatTabs[chatJidStr].Messages[i].Author, guy))
|
||||||
} else {
|
} else {
|
||||||
author.SetText(chatTabs[chatJidStr].Messages[i].Author)
|
author.SetText(chatTabs[chatJidStr].Messages[i].Author)
|
||||||
replytext.Hide()
|
replytext.Hide()
|
||||||
@@ -714,13 +714,21 @@ func main() {
|
|||||||
dialog.ShowError(err, w)
|
dialog.ShowError(err, w)
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
|
} else {
|
||||||
|
err = client.SendText(jid.MustParse(activeMucJid).Bare(), text)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
dialog.ShowError(err, w)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}, w)
|
}, w)
|
||||||
}
|
} else {
|
||||||
err = client.SendText(jid.MustParse(activeMucJid).Bare(), text)
|
err = client.SendText(jid.MustParse(activeMucJid).Bare(), text)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
dialog.ShowError(err, w)
|
dialog.ShowError(err, w)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
@@ -1147,14 +1155,14 @@ func main() {
|
|||||||
album, al_ok := player.RawMetadata()["xesam:album"]
|
album, al_ok := player.RawMetadata()["xesam:album"]
|
||||||
artists := []string{}
|
artists := []string{}
|
||||||
|
|
||||||
if a_ok{
|
if a_ok {
|
||||||
artist.Store(&artists)
|
artist.Store(&artists)
|
||||||
}
|
}
|
||||||
|
|
||||||
if t_ok && a_ok && al_ok && album.String() != "\"\""{
|
if t_ok && a_ok && al_ok && album.String() != "\"\"" {
|
||||||
newtext = fmt.Sprintf("I'm currently listening to %s by %s, in the %s album", strings.Trim(title.String(), "\""), strings.Join(artists, ","), album)
|
newtext = fmt.Sprintf("I'm currently listening to %s by %s, in the %s album", strings.Trim(title.String(), "\""), strings.Join(artists, ","), album)
|
||||||
} else if t_ok && a_ok {
|
} else if t_ok && a_ok {
|
||||||
newtext = fmt.Sprintf("I'm currently listening to %s by %s", strings.Trim(title.String(), "\""), strings.Join(artists, ",") )
|
newtext = fmt.Sprintf("I'm currently listening to %s by %s", strings.Trim(title.String(), "\""), strings.Join(artists, ","))
|
||||||
} else if t_ok {
|
} else if t_ok {
|
||||||
newtext = fmt.Sprintf("I'm currently listening to %s", strings.Trim(title.String(), "\""))
|
newtext = fmt.Sprintf("I'm currently listening to %s", strings.Trim(title.String(), "\""))
|
||||||
} else if a_ok {
|
} else if a_ok {
|
||||||
|
Reference in New Issue
Block a user