Support for Enhanced Import
This commit is contained in:
parent
848d5971b6
commit
aceb4adeb1
|
@ -41,6 +41,7 @@ type Application interface {
|
|||
CreateProfile(name string, password string, autostart bool)
|
||||
|
||||
ImportProfile(exportedCwtchFile string, password string) (peer.CwtchPeer, error)
|
||||
EnhancedImportProfile(exportedCwtchFile string, password string) string
|
||||
DeleteProfile(onion string, currentPassword string)
|
||||
AddPeerPlugin(onion string, pluginID plugins.PluginID)
|
||||
|
||||
|
@ -271,6 +272,14 @@ func (app *application) ImportProfile(exportedCwtchFile string, password string)
|
|||
return profile, err
|
||||
}
|
||||
|
||||
func (app *application) EnhancedImportProfile(exportedCwtchFile string, password string) string {
|
||||
_, err := app.ImportProfile(exportedCwtchFile, password)
|
||||
if err == nil {
|
||||
return ""
|
||||
}
|
||||
return err.Error()
|
||||
}
|
||||
|
||||
// LoadProfiles takes a password and attempts to load any profiles it can from storage with it and create Peers for them
|
||||
func (app *application) LoadProfiles(password string) {
|
||||
count := 0
|
||||
|
|
Loading…
Reference in New Issue