forked from Elara6331/itd
		
	Switch from custom socket API to rpcx
This commit is contained in:
		| @@ -49,7 +49,7 @@ func timeTab(parent fyne.Window, client *api.Client) *fyne.Container { | ||||
| func setTime(client *api.Client, current bool, t ...time.Time) error { | ||||
| 	var err error | ||||
| 	if current { | ||||
| 		err = client.SetTimeNow() | ||||
| 		err = client.SetTime(time.Now()) | ||||
| 	} else { | ||||
| 		err = client.SetTime(t[0]) | ||||
| 	} | ||||
|   | ||||
| @@ -11,7 +11,6 @@ import ( | ||||
| 	"fyne.io/fyne/v2/storage" | ||||
| 	"fyne.io/fyne/v2/widget" | ||||
| 	"go.arsenm.dev/itd/api" | ||||
| 	"go.arsenm.dev/itd/internal/types" | ||||
| ) | ||||
|  | ||||
| func upgradeTab(parent fyne.Window, client *api.Client) *fyne.Container { | ||||
| @@ -119,10 +118,10 @@ func upgradeTab(parent fyne.Window, client *api.Client) *fyne.Container { | ||||
| 		// Get appropriate upgrade type and file paths | ||||
| 		switch upgradeTypeSelect.Selected { | ||||
| 		case "Archive": | ||||
| 			fwUpgType = types.UpgradeTypeArchive | ||||
| 			fwUpgType = api.UpgradeTypeArchive | ||||
| 			files = append(files, archivePath) | ||||
| 		case "Files": | ||||
| 			fwUpgType = types.UpgradeTypeFiles | ||||
| 			fwUpgType = api.UpgradeTypeFiles | ||||
| 			files = append(files, initPktPath, firmwarePath) | ||||
| 		} | ||||
|  | ||||
| @@ -144,7 +143,7 @@ func upgradeTab(parent fyne.Window, client *api.Client) *fyne.Container { | ||||
| 			// Refresh progress bar | ||||
| 			progressBar.Refresh() | ||||
| 			// If transfer finished, break | ||||
| 			if event.Sent == event.Total { | ||||
| 			if int64(event.Sent) == event.Total { | ||||
| 				break | ||||
| 			} | ||||
| 		} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user