format code
This commit is contained in:
17
main.go
17
main.go
@@ -6,29 +6,29 @@ import (
|
|||||||
"fyne.io/fyne/v2/app"
|
"fyne.io/fyne/v2/app"
|
||||||
"fyne.io/fyne/v2/canvas"
|
"fyne.io/fyne/v2/canvas"
|
||||||
"fyne.io/fyne/v2/container"
|
"fyne.io/fyne/v2/container"
|
||||||
"fyne.io/fyne/v2/storage"
|
|
||||||
"fyne.io/fyne/v2/dialog"
|
"fyne.io/fyne/v2/dialog"
|
||||||
"fyne.io/fyne/v2/layout"
|
"fyne.io/fyne/v2/layout"
|
||||||
|
"fyne.io/fyne/v2/storage"
|
||||||
"fyne.io/fyne/v2/widget"
|
"fyne.io/fyne/v2/widget"
|
||||||
|
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
|
"github.com/k3a/html2text"
|
||||||
"github.com/kirsle/configdir"
|
"github.com/kirsle/configdir"
|
||||||
"github.com/mattn/go-mastodon"
|
"github.com/mattn/go-mastodon"
|
||||||
"github.com/k3a/html2text"
|
|
||||||
/*webview "github.com/webview/webview_go"*/
|
/*webview "github.com/webview/webview_go"*/
|
||||||
|
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"path/filepath"
|
|
||||||
"net/url"
|
|
||||||
_ "net/http"
|
_ "net/http"
|
||||||
|
"net/url"
|
||||||
|
"path/filepath"
|
||||||
|
|
||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
_ "time"
|
|
||||||
"strings"
|
"strings"
|
||||||
|
_ "time"
|
||||||
)
|
)
|
||||||
|
|
||||||
var App fyne.App
|
var App fyne.App
|
||||||
@@ -283,7 +283,6 @@ func ProfileLaunch() {
|
|||||||
|
|
||||||
btn.Text = ext + btn.Text
|
btn.Text = ext + btn.Text
|
||||||
|
|
||||||
|
|
||||||
ProfileSelection.Add(
|
ProfileSelection.Add(
|
||||||
container.NewHBox(
|
container.NewHBox(
|
||||||
widget.NewLabel(v.Name),
|
widget.NewLabel(v.Name),
|
||||||
@@ -443,7 +442,6 @@ func main() {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
im := canvas.NewImageFromURI(u)
|
im := canvas.NewImageFromURI(u)
|
||||||
im.Resize(fyne.NewSize(25, 25))
|
im.Resize(fyne.NewSize(25, 25))
|
||||||
im.FillMode = canvas.ImageFillContain
|
im.FillMode = canvas.ImageFillContain
|
||||||
@@ -489,10 +487,10 @@ func main() {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
im := canvas.NewImageFromURI(u)
|
im := canvas.NewImageFromURI(u)
|
||||||
im.FillMode = canvas.ImageFillCover
|
im.FillMode = canvas.ImageFillCover
|
||||||
fyne.Do(func(){Timeline.Add(im)
|
fyne.Do(func() {
|
||||||
|
Timeline.Add(im)
|
||||||
ml := widget.NewRichTextFromMarkdown(fmt.Sprintf("%s %s your post", v.Account.Username, v.Type))
|
ml := widget.NewRichTextFromMarkdown(fmt.Sprintf("%s %s your post", v.Account.Username, v.Type))
|
||||||
ml.Wrapping = fyne.TextWrapWord
|
ml.Wrapping = fyne.TextWrapWord
|
||||||
Timeline.Add(ml)
|
Timeline.Add(ml)
|
||||||
@@ -513,7 +511,6 @@ func main() {
|
|||||||
ShowTimeline()
|
ShowTimeline()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
MainWindow.SetContent(container.NewVSplit(container.NewVScroll(PostTimeline), container.NewHSplit(container.NewVBox(TootEntry, ReplyBox, VisibilitySelector, widget.NewButton("Post", func() {
|
MainWindow.SetContent(container.NewVSplit(container.NewVScroll(PostTimeline), container.NewHSplit(container.NewVBox(TootEntry, ReplyBox, VisibilitySelector, widget.NewButton("Post", func() {
|
||||||
toot := mastodon.Toot{
|
toot := mastodon.Toot{
|
||||||
Status: TootEntry.Text,
|
Status: TootEntry.Text,
|
||||||
|
|||||||
Reference in New Issue
Block a user