mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-01 10:35:15 +01:00
Added capabilities to account
This commit is contained in:
@@ -334,9 +334,19 @@ public class ServiceSynchronize extends LifecycleService {
|
||||
public void opened(ConnectionEvent e) {
|
||||
Log.i(Helper.TAG, account.name + " opened");
|
||||
try {
|
||||
DB db = DB.getInstance(ServiceSynchronize.this);
|
||||
|
||||
List<String> capabilities = new ArrayList<>();
|
||||
if (fstore.hasCapability("IDLE"))
|
||||
capabilities.add("IDLE");
|
||||
if (fstore.hasCapability("MOVE"))
|
||||
capabilities.add("MOVE");
|
||||
account.capabilities = capabilities.toArray(new String[0]);
|
||||
db.account().updateAccount(account);
|
||||
Log.i(Helper.TAG, "capabilities=" + TextUtils.join(",", capabilities));
|
||||
|
||||
synchronizeFolders(account, fstore);
|
||||
|
||||
DB db = DB.getInstance(ServiceSynchronize.this);
|
||||
for (final EntityFolder folder : db.folder().getFolders(account.id, true)) {
|
||||
Log.i(Helper.TAG, account.name + " sync folder " + folder.name);
|
||||
Thread thread = new Thread(new Runnable() {
|
||||
|
||||
Reference in New Issue
Block a user