Version bump; some misc changes
This commit is contained in:
23
main.go
23
main.go
@@ -27,6 +27,8 @@ import (
|
||||
var App fyne.App
|
||||
var MainWindow fyne.Window
|
||||
|
||||
var Version string = "25w47a"
|
||||
|
||||
// Client used for posting, getting posts, etc.
|
||||
var Client *mastodon.Client
|
||||
|
||||
@@ -338,7 +340,7 @@ func main() {
|
||||
|
||||
LoadedConfig = tempconf
|
||||
|
||||
if !LoadedConfig.DoNotDropToProfileSelection {
|
||||
if !LoadedConfig.DoNotDropToProfileSelection || (len(os.Args) > 1 && os.Args[1] == "new") {
|
||||
log.Println("Launching profile selection")
|
||||
ProfileLaunch()
|
||||
return
|
||||
@@ -373,17 +375,30 @@ func main() {
|
||||
|
||||
App = app.New()
|
||||
MainWindow = App.NewWindow("Federalé")
|
||||
TootEntry := widget.NewEntry()
|
||||
MainWindow.SetContent(container.NewVBox(TootEntry, widget.NewButton("Post", func() {
|
||||
TootEntry := widget.NewMultiLineEntry()
|
||||
ReplyIDEntry := widget.NewEntry()
|
||||
ReplyIDLabel := widget.NewLabel("In reply to")
|
||||
ReplyBox := container.NewHBox(ReplyIDLabel, ReplyIDEntry)
|
||||
|
||||
Timeline := container.NewVBox(widget.NewLabel("Please Wait..."))
|
||||
go func() {
|
||||
NewTimeline := container.NewVBox(widget.NewLabel("Posts"))
|
||||
//pg := new(mastodon.Pagination)
|
||||
///
|
||||
Timeline = NewTimeline
|
||||
}()
|
||||
|
||||
MainWindow.SetContent(container.NewHBox(container.NewVBox(TootEntry, ReplyBox, widget.NewButton("Post", func() {
|
||||
toot := mastodon.Toot{
|
||||
Status: TootEntry.Text,
|
||||
Visibility: "public",
|
||||
InReplyToID: mastodon.ID(ReplyIDEntry.Text),
|
||||
}
|
||||
|
||||
_, err := Client.PostStatus(context.Background(), &toot)
|
||||
if err != nil {
|
||||
dialog.ShowError(err, MainWindow)
|
||||
}
|
||||
})))
|
||||
})), Timeline))
|
||||
MainWindow.ShowAndRun()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user