Skip to content

Commit

Permalink
Merge pull request #4862 from Jacalz/minor-code-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacalz committed May 22, 2024
2 parents 0540451 + cba5663 commit 895b96d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions widget/markdown.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func renderNode(source []byte, n ast.Node, blockquote bool) ([]RichTextSegment,
// These empty text elements indicate single line breaks after non-text elements in goldmark.
return []RichTextSegment{&TextSegment{Style: RichTextStyleInline, Text: " "}}, nil
}
text = suffixSpaceIfAppropriate(text, source, n)
text = suffixSpaceIfAppropriate(text, n)
if blockquote {
return []RichTextSegment{&TextSegment{Style: RichTextStyleBlockquote, Text: text}}, nil
}
Expand All @@ -125,7 +125,7 @@ func renderNode(source []byte, n ast.Node, blockquote bool) ([]RichTextSegment,
return nil, nil
}

func suffixSpaceIfAppropriate(text string, source []byte, n ast.Node) string {
func suffixSpaceIfAppropriate(text string, n ast.Node) string {
next := n.NextSibling()
if next != nil && next.Type() == ast.TypeInline && !strings.HasSuffix(text, " ") {
return text + " "
Expand Down
1 change: 1 addition & 0 deletions widget/radio_group_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,5 +317,6 @@ func radioGroupTestTapItem(t *testing.T, radio *RadioGroup, item int) {
}

func radioGroupTestItemRenderer(t *testing.T, radio *RadioGroup, item int) *radioItemRenderer {
t.Cleanup(func() { cache.DestroyRenderer(radio) })
return cache.Renderer(test.WidgetRenderer(radio).Objects()[item].(fyne.Widget)).(*radioItemRenderer)
}
4 changes: 2 additions & 2 deletions widget/tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,7 @@ func newBranch(tree *Tree, content fyne.CanvasObject) (b *branch) {

func (b *branch) update(uid string, depth int) {
b.treeNode.update(uid, depth)
b.icon.(*branchIcon).update(uid, depth)
b.icon.(*branchIcon).update(uid)
}

var _ fyne.Tappable = (*branchIcon)(nil)
Expand Down Expand Up @@ -1021,7 +1021,7 @@ func (i *branchIcon) Tapped(*fyne.PointEvent) {
i.tree.ToggleBranch(i.uid)
}

func (i *branchIcon) update(uid string, depth int) {
func (i *branchIcon) update(uid string) {
i.uid = uid
i.Refresh()
}
Expand Down

0 comments on commit 895b96d

Please sign in to comment.