mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-02 11:01:23 +01:00
Sync on granting contacts permissions
This commit is contained in:
@@ -39,6 +39,9 @@ public interface DaoFolder {
|
||||
" ORDER BY CASE WHEN folder.type = '" + EntityFolder.USER + "' THEN 1 ELSE 0 END")
|
||||
List<EntityFolder> getFolders(long account, boolean synchronize);
|
||||
|
||||
@Query("SELECT * FROM folder WHERE synchronize")
|
||||
List<EntityFolder> getFoldersSynchronizing();
|
||||
|
||||
@Query("SELECT * FROM folder WHERE unified")
|
||||
List<EntityFolder> getUnifiedFolders();
|
||||
|
||||
|
||||
@@ -437,6 +437,17 @@ public class FragmentSetup extends FragmentEx {
|
||||
btnPermissions.setEnabled(!has);
|
||||
tvPermissionsDone.setText(has ? R.string.title_setup_done : R.string.title_setup_to_do);
|
||||
tvPermissionsDone.setCompoundDrawablesWithIntrinsicBounds(has ? check : null, null, null, null);
|
||||
|
||||
if (has)
|
||||
new SimpleTask<Void>() {
|
||||
@Override
|
||||
protected Void onLoad(Context context, Bundle args) {
|
||||
DB db = DB.getInstance(context);
|
||||
for (EntityFolder folder : db.folder().getFoldersSynchronizing())
|
||||
EntityOperation.sync(db, folder.id);
|
||||
return null;
|
||||
}
|
||||
}.load(FragmentSetup.this, new Bundle());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user