mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-27 16:33:47 +00:00
Certificate email case insensitive
This commit is contained in:
parent
1fd7a9f77e
commit
ea1b7c0a6d
2 changed files with 5 additions and 9 deletions
|
@ -29,20 +29,16 @@ import java.util.List;
|
|||
@Dao
|
||||
public interface DaoCertificate {
|
||||
@Query("SELECT * FROM certificate" +
|
||||
" ORDER BY (email = :email) DESC, email, subject")
|
||||
LiveData<List<EntityCertificate>> liveCertificates(String email);
|
||||
|
||||
@Query("SELECT * FROM certificate" +
|
||||
" WHERE id = :id")
|
||||
EntityCertificate getCertificate(long id);
|
||||
" ORDER BY email, subject")
|
||||
LiveData<List<EntityCertificate>> liveCertificates();
|
||||
|
||||
@Query("SELECT * FROM certificate" +
|
||||
" WHERE fingerprint = :fingerprint" +
|
||||
" AND email = :email")
|
||||
" AND email = :email COLLATE NOCASE")
|
||||
EntityCertificate getCertificate(String fingerprint, String email);
|
||||
|
||||
@Query("SELECT * FROM certificate" +
|
||||
" WHERE email = :email")
|
||||
" WHERE email = :email COLLATE NOCASE")
|
||||
List<EntityCertificate> getCertificateByEmail(String email);
|
||||
|
||||
@Insert
|
||||
|
|
|
@ -94,7 +94,7 @@ public class FragmentCertificates extends FragmentBase {
|
|||
super.onActivityCreated(savedInstanceState);
|
||||
|
||||
DB db = DB.getInstance(getContext());
|
||||
db.certificate().liveCertificates(null).observe(getViewLifecycleOwner(), new Observer<List<EntityCertificate>>() {
|
||||
db.certificate().liveCertificates().observe(getViewLifecycleOwner(), new Observer<List<EntityCertificate>>() {
|
||||
@Override
|
||||
public void onChanged(List<EntityCertificate> certificates) {
|
||||
if (certificates == null)
|
||||
|
|
Loading…
Reference in a new issue