mirror of
https://github.com/bitwarden/mobile
synced 2025-12-12 06:13:21 +00:00
Added icons for iOS. Broke out data access into repositories. Added syncing service.
This commit is contained in:
22
src/App/Repositories/FolderRepository.cs
Normal file
22
src/App/Repositories/FolderRepository.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Bit.App.Abstractions;
|
||||
using Bit.App.Models.Data;
|
||||
|
||||
namespace Bit.App.Repositories
|
||||
{
|
||||
public class FolderRepository : Repository<FolderData, string>, IFolderRepository
|
||||
{
|
||||
public FolderRepository(ISqlService sqlService)
|
||||
: base(sqlService)
|
||||
{ }
|
||||
|
||||
public Task<IEnumerable<FolderData>> GetAllByUserIdAsync(string userId)
|
||||
{
|
||||
var folders = Connection.Table<FolderData>().Where(f => f.UserId == userId).Cast<FolderData>();
|
||||
return Task.FromResult(folders);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user