If a collection creation is cancelled by the user, abort
This commit is contained in:
@@ -3,6 +3,6 @@ namespace Logic;
|
|||||||
public interface ISecretService
|
public interface ISecretService
|
||||||
{
|
{
|
||||||
public List<Secret.Collection> GetCollections();
|
public List<Secret.Collection> GetCollections();
|
||||||
public void CreateCollection(string label);
|
public bool CreateCollection(string label);
|
||||||
public void DeleteCollection(string label);
|
public void DeleteCollection(string label);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,9 +22,16 @@ public class SecretService : ISecretService
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void CreateCollection(string label)
|
public bool CreateCollection(string label)
|
||||||
{
|
{
|
||||||
Secret.Collection.CreateSync(service, label, null, Secret.CollectionCreateFlags.None, null);
|
try
|
||||||
|
{
|
||||||
|
Secret.Collection.CreateSync(service, label, null, Secret.CollectionCreateFlags.None, null);
|
||||||
|
return true;
|
||||||
|
} catch (GLib.GException ex)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DeleteCollection(string label)
|
public void DeleteCollection(string label)
|
||||||
|
|||||||
Reference in New Issue
Block a user