Permalink
Browse files

fixed: direct messages list not update after refresh complete.

  • Loading branch information...
1 parent 759b9d1 commit bb2b2510998242f5d0ea5c6fc4367e2bbcd483b2 @mariotaku committed Nov 21, 2012
@@ -111,6 +111,9 @@ public void onReceive(final Context context, final Intent intent) {
if (BROADCAST_RECEIVED_DIRECT_MESSAGES_DATABASE_UPDATED.equals(action)
|| BROADCAST_SENT_DIRECT_MESSAGES_DATABASE_UPDATED.equals(action)) {
getLoaderManager().restartLoader(0, mArguments, DirectMessagesConversationFragment.this);
+ } else if (BROADCAST_RECEIVED_DIRECT_MESSAGES_REFRESHED.equals(action)
+ || BROADCAST_SENT_DIRECT_MESSAGES_REFRESHED.equals(action)) {
+ getLoaderManager().restartLoader(0, mArguments, DirectMessagesConversationFragment.this);
} else if (BROADCAST_REFRESHSTATE_CHANGED.equals(action)) {
setProgressBarIndeterminateVisibility(mService.isReceivedDirectMessagesRefreshing()
|| mService.isSentDirectMessagesRefreshing());
@@ -371,6 +374,8 @@ public void onStart() {
final IntentFilter filter = new IntentFilter(BROADCAST_REFRESHSTATE_CHANGED);
filter.addAction(BROADCAST_RECEIVED_DIRECT_MESSAGES_DATABASE_UPDATED);
filter.addAction(BROADCAST_SENT_DIRECT_MESSAGES_DATABASE_UPDATED);
+ filter.addAction(BROADCAST_RECEIVED_DIRECT_MESSAGES_REFRESHED);
+ filter.addAction(BROADCAST_SENT_DIRECT_MESSAGES_REFRESHED);
registerReceiver(mStatusReceiver, filter);
final float text_size = mPreferences.getInt(PREFERENCE_KEY_TEXT_SIZE, PREFERENCE_DEFAULT_TEXT_SIZE);
@@ -82,6 +82,10 @@ public void onReceive(final Context context, final Intent intent) {
|| BROADCAST_SENT_DIRECT_MESSAGES_DATABASE_UPDATED.equals(action)) {
getLoaderManager().restartLoader(0, null, DirectMessagesFragment.this);
onRefreshComplete();
+ } else if (BROADCAST_RECEIVED_DIRECT_MESSAGES_REFRESHED.equals(action)
+ || BROADCAST_SENT_DIRECT_MESSAGES_REFRESHED.equals(action)) {
+ getLoaderManager().restartLoader(0, null, DirectMessagesFragment.this);
+ onRefreshComplete();
} else if (BROADCAST_REFRESHSTATE_CHANGED.equals(action)) {
if (mService.isReceivedDirectMessagesRefreshing() || mService.isSentDirectMessagesRefreshing()) {
setRefreshing(false);
@@ -249,6 +253,8 @@ public void run() {
filter.addAction(BROADCAST_ACCOUNT_LIST_DATABASE_UPDATED);
filter.addAction(BROADCAST_RECEIVED_DIRECT_MESSAGES_DATABASE_UPDATED);
filter.addAction(BROADCAST_SENT_DIRECT_MESSAGES_DATABASE_UPDATED);
+ filter.addAction(BROADCAST_RECEIVED_DIRECT_MESSAGES_REFRESHED);
+ filter.addAction(BROADCAST_SENT_DIRECT_MESSAGES_REFRESHED);
filter.addAction(BROADCAST_REFRESHSTATE_CHANGED);
registerReceiver(mStatusReceiver, filter);
if (mService.isReceivedDirectMessagesRefreshing() || mService.isSentDirectMessagesRefreshing()) {

0 comments on commit bb2b251

Please sign in to comment.