protected override void PopulateTable() { if (IsUpdating) { return; } //titolo pulsante back //if (!DataManager.Get<IPreferencesManager>().Preferences.AlreadyRun || FileSystemManager.DocumentsToImport > 0 || MBDownloadManager.Context == null) { //_Thread = new Thread(CaricaDocumentiAsync); StartUpdating(true); _Thread = new Thread(() => { if (Activity.CanAccessExternal()) { if (!Directory.Exists(DataManager.Get <ISettingsManager>().Settings.SharedPath)) { Directory.CreateDirectory(DataManager.Get <ISettingsManager>().Settings.SharedPath); } FileSystemManager.ImportDocuments(); } if (MBDownloadManager.Context == null) { MBDownloadManager.Context = Activity.BaseContext; MBDownloadManager.InstallFinishedMB(); } if (Activity != null) { Activity.RunOnUiThread(() => { LoadDocuments(); StopUpdating(); }); } }); _Thread.Start(); } /*else * { * StartUpdating(true); * * LoadDocuments(); * * StopUpdating(); * }*/ CheckUpdates(); }