Refresh task list after backup import

pull/14/head
Sam Bosley 13 years ago
parent e34ebd2432
commit 559bf8d096

@ -8,6 +8,7 @@ import android.widget.Button;
import com.timsu.astrid.R; import com.timsu.astrid.R;
import com.todoroo.andlib.service.ContextManager; import com.todoroo.andlib.service.ContextManager;
import com.todoroo.astrid.utility.Flags;
public class BackupActivity extends Activity { public class BackupActivity extends Activity {
@ -43,6 +44,7 @@ public class BackupActivity extends Activity {
public void run() { public void run() {
setResult(RESULT_OK); setResult(RESULT_OK);
finish(); finish();
Flags.set(Flags.REFRESH);
} }
}); });
} }

@ -597,6 +597,10 @@ public class TaskListFragment extends ListFragment implements OnScrollListener,
new IntentFilter(AstridApiConstants.BROADCAST_EVENT_REFRESH)); new IntentFilter(AstridApiConstants.BROADCAST_EVENT_REFRESH));
syncActionHelper.register(); syncActionHelper.register();
if (Flags.checkAndClear(Flags.REFRESH)) {
refresh();
}
setUpBackgroundJobs(); setUpBackgroundJobs();
if (!Preferences.getBoolean( if (!Preferences.getBoolean(
@ -702,13 +706,6 @@ public class TaskListFragment extends ListFragment implements OnScrollListener,
} }
} }
public void onWindowFocusChanged(boolean hasFocus) {
if (hasFocus && Flags.checkAndClear(Flags.REFRESH)) {
taskAdapter.flushCaches();
loadTaskListContent(true);
}
}
@Override @Override
public void onActivityResult(int requestCode, int resultCode, Intent data) { public void onActivityResult(int requestCode, int resultCode, Intent data) {
if(quickAddBar.onActivityResult(requestCode, resultCode, data)) if(quickAddBar.onActivityResult(requestCode, resultCode, data))

Loading…
Cancel
Save