|
|
@@ -626,12 +626,20 @@ public class MainActivity extends Activity {
|
|
|
/**
|
|
|
* Performs a full sync against the remote database.
|
|
|
*/
|
|
|
- public void sync() {
|
|
|
+ private void sync() {
|
|
|
ProgressBar pbSync = (ProgressBar) findViewById(R.id.pb_sync);
|
|
|
ImageView ivSync = (ImageView) findViewById(R.id.iv_logo);
|
|
|
new Sync(this, pbSync, ivSync).execute();
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * Asks the activity to performa a sync.
|
|
|
+ * Intended to be called from any screen.
|
|
|
+ */
|
|
|
+ public void bgSync(){
|
|
|
+ new Sync(this).execute();
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* Perform an initial sync before the app can be used.
|
|
|
* A dialog will block the UI.
|