mirror of
https://github.com/bitwarden/mobile.git
synced 2024-11-04 08:50:18 +01:00
data model updates
This commit is contained in:
parent
351c99fb42
commit
f76051d362
@ -1,5 +1,4 @@
|
||||
using Bit.Core.Models.Api;
|
||||
using Bit.Core.Models.Response;
|
||||
using Bit.Core.Models.Response;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@ -10,7 +9,7 @@ namespace Bit.Core.Models.Data
|
||||
{
|
||||
public CipherData() { }
|
||||
|
||||
public CipherData(CipherResponse response, string userId = null, List<string> collectionIds = null)
|
||||
public CipherData(CipherResponse response, string userId = null, HashSet<string> collectionIds = null)
|
||||
{
|
||||
Id = response.Id;
|
||||
OrganizationId = response.OrganizationId;
|
||||
@ -23,7 +22,7 @@ namespace Bit.Core.Models.Data
|
||||
Type = response.Type;
|
||||
Name = response.Name;
|
||||
Notes = response.Notes;
|
||||
CollectionIds = collectionIds != null ? collectionIds : response.CollectionIds;
|
||||
CollectionIds = collectionIds?.ToList() ?? response.CollectionIds;
|
||||
|
||||
switch(Type)
|
||||
{
|
||||
|
@ -4,7 +4,7 @@ namespace Bit.Core.Models.Data
|
||||
{
|
||||
public class CollectionData : Data
|
||||
{
|
||||
public CollectionData(CollectionResponse response)
|
||||
public CollectionData(CollectionDetailsResponse response)
|
||||
{
|
||||
Id = response.Id;
|
||||
OrganizationId = response.OrganizationId;
|
||||
|
Loading…
Reference in New Issue
Block a user