|
|
@ -4,6 +4,7 @@ import android.app.PendingIntent.CanceledException;
|
|
|
|
import android.content.BroadcastReceiver;
|
|
|
|
import android.content.BroadcastReceiver;
|
|
|
|
import android.content.Context;
|
|
|
|
import android.content.Context;
|
|
|
|
import android.content.Intent;
|
|
|
|
import android.content.Intent;
|
|
|
|
|
|
|
|
import android.content.SharedPreferences;
|
|
|
|
import android.content.res.Configuration;
|
|
|
|
import android.content.res.Configuration;
|
|
|
|
import android.os.Bundle;
|
|
|
|
import android.os.Bundle;
|
|
|
|
import android.support.v4.app.Fragment;
|
|
|
|
import android.support.v4.app.Fragment;
|
|
|
@ -23,6 +24,7 @@ import com.todoroo.astrid.api.FilterWithCustomIntent;
|
|
|
|
import com.todoroo.astrid.api.IntentFilter;
|
|
|
|
import com.todoroo.astrid.api.IntentFilter;
|
|
|
|
import com.todoroo.astrid.core.PluginServices;
|
|
|
|
import com.todoroo.astrid.core.PluginServices;
|
|
|
|
import com.todoroo.astrid.core.SearchFilter;
|
|
|
|
import com.todoroo.astrid.core.SearchFilter;
|
|
|
|
|
|
|
|
import com.todoroo.astrid.core.SortHelper;
|
|
|
|
import com.todoroo.astrid.data.TagData;
|
|
|
|
import com.todoroo.astrid.data.TagData;
|
|
|
|
import com.todoroo.astrid.data.Task;
|
|
|
|
import com.todoroo.astrid.data.Task;
|
|
|
|
import com.todoroo.astrid.reminders.NotificationFragment;
|
|
|
|
import com.todoroo.astrid.reminders.NotificationFragment;
|
|
|
@ -31,7 +33,9 @@ import com.todoroo.astrid.reminders.ReminderDialog;
|
|
|
|
import com.todoroo.astrid.service.StartupService;
|
|
|
|
import com.todoroo.astrid.service.StartupService;
|
|
|
|
import com.todoroo.astrid.service.StatisticsConstants;
|
|
|
|
import com.todoroo.astrid.service.StatisticsConstants;
|
|
|
|
import com.todoroo.astrid.service.StatisticsService;
|
|
|
|
import com.todoroo.astrid.service.StatisticsService;
|
|
|
|
|
|
|
|
import com.todoroo.astrid.subtasks.SubtasksListFragment;
|
|
|
|
import com.todoroo.astrid.ui.DateChangedAlerts;
|
|
|
|
import com.todoroo.astrid.ui.DateChangedAlerts;
|
|
|
|
|
|
|
|
import com.todoroo.astrid.utility.AstridPreferences;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* This wrapper activity contains all the glue-code to handle the callbacks between the different
|
|
|
|
* This wrapper activity contains all the glue-code to handle the callbacks between the different
|
|
|
@ -189,7 +193,16 @@ public class AstridActivity extends FragmentActivity
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
protected final void setupTasklistFragmentWithFilter(Filter filter) {
|
|
|
|
protected final void setupTasklistFragmentWithFilter(Filter filter) {
|
|
|
|
setupTasklistFragmentWithFilterAndCustomTaskList(filter, TaskListFragment.class);
|
|
|
|
Class<?> customTaskList = TaskListFragment.class;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(filter == null || filter.sqlQuery == null) {
|
|
|
|
|
|
|
|
SharedPreferences publicPrefs = AstridPreferences.getPublicPrefs(this);
|
|
|
|
|
|
|
|
int sortFlags = publicPrefs.getInt(SortHelper.PREF_SORT_FLAGS, 0);
|
|
|
|
|
|
|
|
if(SortHelper.isManualSort(sortFlags))
|
|
|
|
|
|
|
|
customTaskList = SubtasksListFragment.class;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setupTasklistFragmentWithFilterAndCustomTaskList(filter, customTaskList);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
protected final void setupTasklistFragmentWithFilterAndCustomTaskList(Filter filter, Class<?> customTaskList) {
|
|
|
|
protected final void setupTasklistFragmentWithFilterAndCustomTaskList(Filter filter, Class<?> customTaskList) {
|
|
|
|