mirror of
https://github.com/bitwarden/mobile
synced 2025-12-18 17:23:18 +00:00
sync and display attachments on view login
This commit is contained in:
22
src/App/Repositories/AttachmentRepository.cs
Normal file
22
src/App/Repositories/AttachmentRepository.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 AttachmentRepository : Repository<AttachmentData, string>, IAttachmentRepository
|
||||
{
|
||||
public AttachmentRepository(ISqlService sqlService)
|
||||
: base(sqlService)
|
||||
{ }
|
||||
|
||||
public Task<IEnumerable<AttachmentData>> GetAllByLoginIdAsync(string loginId)
|
||||
{
|
||||
var attachments = Connection.Table<AttachmentData>().Where(a => a.LoginId == loginId).Cast<AttachmentData>();
|
||||
return Task.FromResult(attachments);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user