Passed
Push — main ( f10731...b4871f )
by Rafael
01:34
created

ui.ShowConfirm   A

Complexity

Conditions 3

Size

Total Lines 11
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 3
eloc 9
dl 0
loc 11
rs 9.95
c 0
b 0
f 0
nop 3
1
package ui
2
3
import "fyne.io/fyne/v2/dialog"
4
5
func ShowConfirm(title, text string, callback func()) {
6
	dialog.NewConfirm(
7
		title,
8
		text,
9
		func(b bool) {
10
			if b {
11
				callback()
12
			}
13
		},
14
		Window,
15
	).Show()
16
}
17