Bugfixes to waiting on me query, visual improvements

pull/14/head
Sam Bosley 12 years ago
parent 64f99309f0
commit 9cb346ea61

@ -68,7 +68,8 @@ public final class CoreFilterExposer extends BroadcastReceiver implements Astrid
filters.add(getTodayFilter(r));
if (Preferences.getBoolean(R.string.p_show_waiting_on_me_filter, true) &&
PluginServices.getWaitingOnMeDao().count(Query.select(WaitingOnMe.ID).where(Criterion.and(WaitingOnMe.DELETED_AT.eq(0), WaitingOnMe.READ_AT.eq(0), WaitingOnMe.ACKNOWLEDGED.neq(1)))) > 0)
PluginServices.getWaitingOnMeDao().count(Query.select(WaitingOnMe.ID).where(Criterion.and(WaitingOnMe.DELETED_AT.eq(0),
Criterion.or(WaitingOnMe.ACKNOWLEDGED.isNull(), WaitingOnMe.ACKNOWLEDGED.neq(1))))) > 0)
filters.add(getWaitingOnMeFilter(r));
// transmit filter list
@ -113,8 +114,9 @@ public final class CoreFilterExposer extends BroadcastReceiver implements Astrid
public static Filter getWaitingOnMeFilter(Resources r) {
FilterWithCustomIntent waitingOnMe = new FilterWithCustomIntent(r.getString(R.string.BFE_waiting_on_me), r.getString(R.string.BFE_waiting_on_me),
new QueryTemplate().join(Join.inner(WaitingOnMe.TABLE, Task.UUID.eq(WaitingOnMe.TASK_UUID))).where(
Criterion.and(TaskCriteria.activeVisibleMine(),
WaitingOnMe.DELETED_AT.eq(0), Criterion.or(WaitingOnMe.ACKNOWLEDGED.isNull(), WaitingOnMe.ACKNOWLEDGED.eq(0)))).groupBy(Task.UUID), null);
Criterion.and(WaitingOnMe.DELETED_AT.eq(0),
Criterion.or(WaitingOnMe.ACKNOWLEDGED.isNull(), WaitingOnMe.ACKNOWLEDGED.neq(1))))
.groupBy(Task.UUID), null);
waitingOnMe.customTaskList = new ComponentName(ContextManager.getContext(), WaitingOnMeFragment.class);
int themeFlags = ThemeService.getFilterThemeFlags();
waitingOnMe.listingIcon = ((BitmapDrawable) r.getDrawable(

@ -12,38 +12,6 @@
android:layout_height="fill_parent"
android:orientation="vertical" >
<LinearLayout
android:id="@+id/waiting_on_me"
android:layout_width="fill_parent"
android:layout_height="43dip"
android:padding="5dip"
android:gravity="center_vertical"
android:visibility="gone"
android:background="?attr/asMembersHeaderBackground">
<TextView
android:id="@+id/wom_message"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"/>
<TextView
android:id="@+id/wom_dismiss"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_marginRight="5dip"
android:textColor="@android:color/white"
android:background="#707070"
android:text="@string/wom_dismiss"/>
<TextView
android:id="@+id/wom_acknowledge"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:textColor="@android:color/white"
android:background="?attr/asThemeTextColor"
android:text="@string/wom_acknowledge"/>
</LinearLayout>
<com.todoroo.astrid.ui.NestableScrollView
android:id="@+id/edit_scroll"
style="@style/Content_EditScroll"
@ -58,6 +26,60 @@
android:gravity="center_horizontal"
android:padding="10dip" >
<RelativeLayout
android:id="@+id/waiting_on_me"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dip"
android:padding="10dip"
android:visibility="visible"
style="@style/EditRow">
<ImageView
android:id="@+id/wom_icon"
android:layout_marginRight="10dip"
android:layout_width="20dip"
android:layout_height="20dip"
android:scaleType="fitCenter"/>
<TextView
android:id="@+id/wom_message"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dip"
android:layout_toRightOf="@id/wom_icon"/>
<TextView
android:id="@+id/wom_acknowledge"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_below="@id/wom_message"
android:layout_marginRight="10dip"
android:layout_alignLeft="@id/wom_message"
android:paddingLeft="3dip"
android:paddingRight="3dip"
android:paddingTop="1dip"
android:paddingBottom="1dip"
android:textColor="@android:color/white"
android:background="?attr/asThemeTextColor"
android:text="@string/wom_acknowledge"/>
<TextView
android:id="@+id/wom_dismiss"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_marginRight="5dip"
android:layout_toRightOf="@id/wom_acknowledge"
android:layout_below="@id/wom_message"
android:paddingLeft="3dip"
android:paddingRight="3dip"
android:paddingTop="1dip"
android:paddingBottom="1dip"
android:textColor="@android:color/white"
android:background="#707070"
android:text="@string/wom_dismiss"/>
</RelativeLayout>
<LinearLayout
android:id="@+id/title_controls"
style="@style/EditRow"

@ -43,6 +43,7 @@ import android.widget.Button;
import android.widget.EditText;
import android.widget.FrameLayout;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ScrollView;
import android.widget.TextView;
@ -820,6 +821,9 @@ ViewPager.OnPageChangeListener, EditNoteActivity.UpdatesChangedListener {
TextView womText = (TextView) waitingOnMe.findViewById(R.id.wom_message);
womText.setText(getWomText(wom));
ImageView womIcon = (ImageView) waitingOnMe.findViewById(R.id.wom_icon);
womIcon.setImageResource(ThemeService.getTaskEditDrawable(R.drawable.tea_icn_edit, R.drawable.tea_icn_edit_lightblue));
}
}
}

@ -729,7 +729,7 @@ public class TaskListFragment extends SherlockListFragment implements OnScrollLi
try {
root.removeView(feedbackPrompt);
FeedbackPromptDialogs.showFeedbackDialog((AstridActivity) getActivity(), true);
// Preferences.setLong(PREF_LAST_FEEDBACK_TIME, DateUtilities.now());
Preferences.setLong(PREF_LAST_FEEDBACK_TIME, DateUtilities.now());
} catch (Exception e) {
e.printStackTrace();
}
@ -742,7 +742,7 @@ public class TaskListFragment extends SherlockListFragment implements OnScrollLi
try {
root.removeView(feedbackPrompt);
FeedbackPromptDialogs.showFeedbackDialog((AstridActivity) getActivity(), false);
// Preferences.setLong(PREF_LAST_FEEDBACK_TIME, DateUtilities.now());
Preferences.setLong(PREF_LAST_FEEDBACK_TIME, DateUtilities.now());
} catch (Exception e) {
e.printStackTrace();
}

Loading…
Cancel
Save