code: func updateDialog(progress camtypes.ShareImportProgress,
  	updateDialogFunc func(message string, importedBlobRef string)) {
  	if progress.Running {
  		if progress.Assembled {
  			updateDialogFunc("Importing file in progress", "")
  			return
  		}
  		updateDialogFunc(fmt.Sprintf("Working - %d/%d files imported", progress.FilesCopied, progress.FilesSeen), "")
  		return
  	}
  
  	if progress.Assembled {
  		updateDialogFunc(fmt.Sprintf("File successfully imported as"), progress.BlobRef.String())
  		return
  	}
  	updateDialogFunc(fmt.Sprintf("Done - %d/%d files imported under", progress.FilesCopied, progress.FilesSeen), progress.BlobRef.String())
  }
docs: // updateDialog uses updateDialogFunc to refresh the dialog that displays the
  // status of the import. Message is printed first in the dialog, and
  // importBlobRef is only passed when the import is done, to be displayed below as a
  // link to the newly imported file or directory.