reload tweets when filter applied

This commit is contained in:
Mariotaku Lee 2015-05-05 17:11:14 +08:00
parent 411ebf8e26
commit a10f56a38a
12 changed files with 29 additions and 27 deletions

View File

@ -43,6 +43,7 @@ import org.mariotaku.twidere.adapter.AbsStatusesAdapter;
import org.mariotaku.twidere.adapter.CursorStatusesAdapter;
import org.mariotaku.twidere.loader.support.ExtendedCursorLoader;
import org.mariotaku.twidere.provider.TwidereDataStore.Accounts;
import org.mariotaku.twidere.provider.TwidereDataStore.Filters;
import org.mariotaku.twidere.provider.TwidereDataStore.Statuses;
import org.mariotaku.twidere.util.AsyncTaskUtils;
import org.mariotaku.twidere.util.Utils;
@ -174,7 +175,9 @@ public abstract class CursorStatusesFragment extends AbsStatusesFragment<Cursor>
}
};
cr.registerContentObserver(Accounts.CONTENT_URI, true, mContentObserver);
cr.registerContentObserver(Filters.CONTENT_URI, true, mContentObserver);
updateRefreshState();
reloadStatuses();
}
protected void reloadStatuses() {

View File

@ -31,12 +31,12 @@ import org.mariotaku.twidere.view.iface.IThemeAccentView;
/**
* Created by mariotaku on 15/4/25.
*/
public class ThemedAccentProgressWheel extends ProgressWheel implements IThemeAccentView {
public ThemedAccentProgressWheel(Context context, AttributeSet attrs) {
public class AccentProgressWheel extends ProgressWheel implements IThemeAccentView {
public AccentProgressWheel(Context context, AttributeSet attrs) {
super(context, attrs);
}
public ThemedAccentProgressWheel(Context context) {
public AccentProgressWheel(Context context) {
super(context);
}

View File

@ -30,12 +30,12 @@ import org.mariotaku.twidere.view.iface.IThemeAccentView;
/**
* Created by mariotaku on 15/4/25.
*/
public class ThemedAccentSwipeRefreshLayout extends SwipeRefreshLayout implements IThemeAccentView {
public ThemedAccentSwipeRefreshLayout(Context context, AttributeSet attrs) {
public class AccentSwipeRefreshLayout extends SwipeRefreshLayout implements IThemeAccentView {
public AccentSwipeRefreshLayout(Context context, AttributeSet attrs) {
super(context, attrs);
}
public ThemedAccentSwipeRefreshLayout(Context context) {
public AccentSwipeRefreshLayout(Context context) {
super(context);
}

View File

@ -32,19 +32,19 @@ import org.mariotaku.twidere.view.iface.IThemeBackgroundTintView;
/**
* Created by mariotaku on 14/11/5.
*/
public class ThemedBackgroundTintImageButton extends ImageButton implements IThemeBackgroundTintView {
public class BackgroundTintImageButton extends ImageButton implements IThemeBackgroundTintView {
private final int mDefaultColor;
public ThemedBackgroundTintImageButton(Context context) {
public BackgroundTintImageButton(Context context) {
this(context, null);
}
public ThemedBackgroundTintImageButton(Context context, AttributeSet attrs) {
public BackgroundTintImageButton(Context context, AttributeSet attrs) {
this(context, attrs, android.R.attr.imageButtonStyle);
}
public ThemedBackgroundTintImageButton(Context context, AttributeSet attrs, int defStyleAttr) {
public BackgroundTintImageButton(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
final TypedArray a = context.obtainStyledAttributes(attrs, new int[]{android.R.attr.color,
android.R.attr.colorForeground});

View File

@ -31,17 +31,17 @@ import org.mariotaku.twidere.view.iface.IThemeBackgroundTintView;
/**
* TextView with tint background support
*/
public class ThemedBackgroundTintMaterialEditText extends MaterialEditText implements IThemeBackgroundTintView {
public class BackgroundTintMaterialEditText extends MaterialEditText implements IThemeBackgroundTintView {
public ThemedBackgroundTintMaterialEditText(Context context) {
public BackgroundTintMaterialEditText(Context context) {
super(context);
}
public ThemedBackgroundTintMaterialEditText(Context context, AttributeSet attrs) {
public BackgroundTintMaterialEditText(Context context, AttributeSet attrs) {
super(context, attrs);
}
public ThemedBackgroundTintMaterialEditText(Context context, AttributeSet attrs, int style) {
public BackgroundTintMaterialEditText(Context context, AttributeSet attrs, int style) {
super(context, attrs, style);
}

View File

@ -39,7 +39,6 @@
android:layout_toRightOf="@+id/profile_image"
android:clickable="true"
app:bubbleColor="?colorAccent"
android:layoutDirection="rtl"
app:caretHeight="8dp"
app:caretPosition="topStart"
app:caretWidth="8dp"

View File

@ -23,7 +23,7 @@
android:layout_height="match_parent"
android:padding="8dp">
<org.mariotaku.twidere.view.themed.ThemedBackgroundTintMaterialEditText
<org.mariotaku.twidere.view.themed.BackgroundTintMaterialEditText
android:id="@+id/name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -38,7 +38,7 @@
app:met_floatingLabelText="@string/name"
app:met_maxCharacters="20" />
<org.mariotaku.twidere.view.themed.ThemedBackgroundTintMaterialEditText
<org.mariotaku.twidere.view.themed.BackgroundTintMaterialEditText
android:id="@+id/description"
android:layout_width="match_parent"
android:layout_height="wrap_content"

View File

@ -25,7 +25,7 @@
<include layout="@layout/layout_content_fragment_common" />
<org.mariotaku.twidere.view.themed.ThemedAccentSwipeRefreshLayout
<org.mariotaku.twidere.view.themed.AccentSwipeRefreshLayout
android:id="@+id/swipe_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
@ -41,5 +41,5 @@
android:focusableInTouchMode="false"
android:listSelector="?selectableItemBackground" />
</org.mariotaku.twidere.view.themed.ThemedAccentSwipeRefreshLayout>
</org.mariotaku.twidere.view.themed.AccentSwipeRefreshLayout>
</FrameLayout>

View File

@ -26,7 +26,7 @@
<include layout="@layout/layout_content_fragment_common" />
<org.mariotaku.twidere.view.themed.ThemedAccentSwipeRefreshLayout
<org.mariotaku.twidere.view.themed.AccentSwipeRefreshLayout
android:id="@+id/swipe_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
@ -41,5 +41,5 @@
android:focusableInTouchMode="false"
android:scrollbars="vertical" />
</org.mariotaku.twidere.view.themed.ThemedAccentSwipeRefreshLayout>
</org.mariotaku.twidere.view.themed.AccentSwipeRefreshLayout>
</FrameLayout>

View File

@ -218,7 +218,7 @@
android:orientation="vertical"
android:padding="@dimen/element_spacing_normal">
<org.mariotaku.twidere.view.themed.ThemedBackgroundTintMaterialEditText
<org.mariotaku.twidere.view.themed.BackgroundTintMaterialEditText
android:id="@+id/name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -229,7 +229,7 @@
app:met_floatingLabelText="@string/name"
app:met_maxCharacters="20" />
<org.mariotaku.twidere.view.themed.ThemedBackgroundTintMaterialEditText
<org.mariotaku.twidere.view.themed.BackgroundTintMaterialEditText
android:id="@+id/description"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -241,7 +241,7 @@
app:met_floatingLabelText="@string/description"
app:met_maxCharacters="160" />
<org.mariotaku.twidere.view.themed.ThemedBackgroundTintMaterialEditText
<org.mariotaku.twidere.view.themed.BackgroundTintMaterialEditText
android:id="@+id/location"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -252,7 +252,7 @@
app:met_floatingLabelText="@string/location"
app:met_maxCharacters="30" />
<org.mariotaku.twidere.view.themed.ThemedBackgroundTintMaterialEditText
<org.mariotaku.twidere.view.themed.BackgroundTintMaterialEditText
android:id="@+id/url"
android:layout_width="match_parent"
android:layout_height="wrap_content"

View File

@ -51,7 +51,7 @@
<requestFocus />
</EditText>
<org.mariotaku.twidere.view.themed.ThemedBackgroundTintImageButton
<org.mariotaku.twidere.view.themed.BackgroundTintImageButton
android:id="@+id/query_button"
style="?cardActionButtonStyle"
android:layout_width="@dimen/element_size_normal"

View File

@ -20,7 +20,7 @@
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<org.mariotaku.twidere.view.themed.ThemedAccentProgressWheel
<org.mariotaku.twidere.view.themed.AccentProgressWheel
android:id="@+id/load_progress"
android:layout_width="@dimen/element_size_normal"
android:layout_height="@dimen/element_size_normal"