|
|
@ -7,10 +7,7 @@ package com.todoroo.astrid.activity;
|
|
|
|
|
|
|
|
|
|
|
|
import android.app.Activity;
|
|
|
|
import android.app.Activity;
|
|
|
|
import android.app.AlertDialog;
|
|
|
|
import android.app.AlertDialog;
|
|
|
|
import android.content.BroadcastReceiver;
|
|
|
|
|
|
|
|
import android.content.Context;
|
|
|
|
|
|
|
|
import android.content.Intent;
|
|
|
|
import android.content.Intent;
|
|
|
|
import android.content.IntentFilter;
|
|
|
|
|
|
|
|
import android.net.Uri;
|
|
|
|
import android.net.Uri;
|
|
|
|
import android.os.Bundle;
|
|
|
|
import android.os.Bundle;
|
|
|
|
import android.support.v4.view.MenuItemCompat;
|
|
|
|
import android.support.v4.view.MenuItemCompat;
|
|
|
@ -75,13 +72,6 @@ public class TaskListActivity extends AstridActivity implements OnPageChangeList
|
|
|
|
|
|
|
|
|
|
|
|
public static final String OPEN_TASK = "openTask"; //$NON-NLS-1$
|
|
|
|
public static final String OPEN_TASK = "openTask"; //$NON-NLS-1$
|
|
|
|
|
|
|
|
|
|
|
|
private final BroadcastReceiver refreshReceiver = new BroadcastReceiver() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void onReceive(Context context, Intent intent) {
|
|
|
|
|
|
|
|
refreshTaskList();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @see android.app.Activity#onCreate(Bundle)
|
|
|
|
* @see android.app.Activity#onCreate(Bundle)
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -139,18 +129,9 @@ public class TaskListActivity extends AstridActivity implements OnPageChangeList
|
|
|
|
protected void onResume() {
|
|
|
|
protected void onResume() {
|
|
|
|
super.onResume();
|
|
|
|
super.onResume();
|
|
|
|
|
|
|
|
|
|
|
|
registerReceiver(refreshReceiver, new IntentFilter(AstridApiConstants.BROADCAST_EVENT_REFRESH));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getTaskListFragment().setSyncOngoing(gtasksPreferenceService.isOngoing());
|
|
|
|
getTaskListFragment().setSyncOngoing(gtasksPreferenceService.isOngoing());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
protected void onPause() {
|
|
|
|
|
|
|
|
super.onPause();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
unregisterReceiver(refreshReceiver);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public boolean onCreateOptionsMenu(Menu menu) {
|
|
|
|
public boolean onCreateOptionsMenu(Menu menu) {
|
|
|
|
if (isDrawerOpen()) {
|
|
|
|
if (isDrawerOpen()) {
|
|
|
|