Individual account management - to be tested

This commit is contained in:
M66B
2019-12-07 15:14:35 +01:00
parent 35602ef17c
commit 2591dc9011
33 changed files with 378 additions and 717 deletions

View File

@@ -57,6 +57,7 @@ import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.google.android.material.snackbar.Snackbar;
import java.util.Collections;
import java.util.List;
import static android.app.Activity.RESULT_OK;
@@ -343,9 +344,14 @@ public class FragmentFolders extends FragmentBase {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
boolean enabled = prefs.getBoolean("enabled", true);
if (enabled)
ServiceSynchronize.reload(context, "refresh folders");
else
ServiceSynchronize.process(context, true);
ServiceSynchronize.eval(context, true, "refresh folders");
else {
List<EntityFolder> folders = db.folder().getSynchronizingFolders(aid);
if (folders.size() > 0)
Collections.sort(folders, folders.get(0).getComparator(context));
for (EntityFolder folder : folders)
EntityOperation.sync(context, folder.id, false);
}
}
db.setTransactionSuccessful();