Merge "Follow-up to the loader API change"
This commit is contained in:
commit
22fb45817b
|
@ -151,6 +151,7 @@ public class ContactStatusLoader extends AsyncTaskLoader<ContactStatusLoader.Res
|
||||||
cancelLoad();
|
cancelLoad();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void reset() {
|
public void reset() {
|
||||||
stopLoading();
|
stopLoading();
|
||||||
}
|
}
|
||||||
|
|
|
@ -353,11 +353,11 @@ public class MailboxListFragment extends ListFragment implements OnItemClickList
|
||||||
if (cursor.getCount() == 0) {
|
if (cursor.getCount() == 0) {
|
||||||
// If there's no row, don't set it to the ListView.
|
// If there's no row, don't set it to the ListView.
|
||||||
// Instead use setListShown(false) to make ListFragment show progress icon.
|
// Instead use setListShown(false) to make ListFragment show progress icon.
|
||||||
mListAdapter.changeCursor(null);
|
mListAdapter.swapCursor(null);
|
||||||
setListShown(false);
|
setListShown(false);
|
||||||
} else {
|
} else {
|
||||||
// Set the adapter.
|
// Set the adapter.
|
||||||
mListAdapter.changeCursor(cursor);
|
mListAdapter.swapCursor(cursor);
|
||||||
setListAdapter(mListAdapter);
|
setListAdapter(mListAdapter);
|
||||||
setListShown(true);
|
setListShown(true);
|
||||||
|
|
||||||
|
@ -375,7 +375,9 @@ public class MailboxListFragment extends ListFragment implements OnItemClickList
|
||||||
mAccountChanging = false;
|
mAccountChanging = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void onLoaderReset(Loader<Cursor> loader) {
|
public void onLoaderReset(Loader<Cursor> loader) {
|
||||||
|
mListAdapter.swapCursor(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1061,6 +1061,7 @@ public class MessageListFragment extends ListFragment
|
||||||
mMailboxChanging = false;
|
mMailboxChanging = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void onLoaderReset(Loader<MailboxAccountLoader.Result> loader) {
|
public void onLoaderReset(Loader<MailboxAccountLoader.Result> loader) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1112,7 +1113,7 @@ public class MessageListFragment extends ListFragment
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update the list
|
// Update the list
|
||||||
mListAdapter.changeCursor(cursor);
|
mListAdapter.swapCursor(cursor);
|
||||||
// Show chips if combined view.
|
// Show chips if combined view.
|
||||||
mListAdapter.setShowColorChips(mMailboxId < 0 && mCountTotalAccounts > 1);
|
mListAdapter.setShowColorChips(mMailboxId < 0 && mCountTotalAccounts > 1);
|
||||||
setListAdapter(mListAdapter);
|
setListAdapter(mListAdapter);
|
||||||
|
@ -1141,7 +1142,9 @@ public class MessageListFragment extends ListFragment
|
||||||
mMailboxChanging = false;
|
mMailboxChanging = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void onLoaderReset(Loader<Cursor> loader) {
|
public void onLoaderReset(Loader<Cursor> loader) {
|
||||||
|
mListAdapter.swapCursor(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -594,7 +594,9 @@ public class MessageListXL extends Activity implements
|
||||||
updateAccountList(data);
|
updateAccountList(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void onLoaderReset(Loader<Cursor> loader) {
|
public void onLoaderReset(Loader<Cursor> loader) {
|
||||||
|
mAccountsSelectorAdapter.swapCursor(null);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -634,7 +636,7 @@ public class MessageListXL extends Activity implements
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update the dropdown list.
|
// Update the dropdown list.
|
||||||
mAccountsSelectorAdapter.changeCursor(accountsCursor);
|
mAccountsSelectorAdapter.swapCursor(accountsCursor);
|
||||||
|
|
||||||
// Don't show the title.
|
// Don't show the title.
|
||||||
ab.setDisplayOptions(0, ActionBar.DISPLAY_SHOW_TITLE);
|
ab.setDisplayOptions(0, ActionBar.DISPLAY_SHOW_TITLE);
|
||||||
|
|
|
@ -686,6 +686,7 @@ public abstract class MessageViewFragmentBase extends Fragment implements View.O
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void onLoaderReset(Loader<ContactStatusLoader.Result> loader) {
|
public void onLoaderReset(Loader<ContactStatusLoader.Result> loader) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -183,6 +183,7 @@ public class MoveMessageToDialog extends DialogFragment implements DialogInterfa
|
||||||
null, new MailboxesLoaderCallbacks());
|
null, new MailboxesLoaderCallbacks());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void onLoaderReset(Loader<Long> loader) {
|
public void onLoaderReset(Loader<Long> loader) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -202,10 +203,12 @@ public class MoveMessageToDialog extends DialogFragment implements DialogInterfa
|
||||||
if (mDestroyed) {
|
if (mDestroyed) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
mAdapter.changeCursor(data);
|
mAdapter.swapCursor(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void onLoaderReset(Loader<Cursor> loader) {
|
public void onLoaderReset(Loader<Cursor> loader) {
|
||||||
|
mAdapter.swapCursor(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -275,6 +278,7 @@ public class MoveMessageToDialog extends DialogFragment implements DialogInterfa
|
||||||
cancelLoad();
|
cancelLoad();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void reset() {
|
public void reset() {
|
||||||
stopLoading();
|
stopLoading();
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,6 +102,7 @@ public class MailboxAccountLoader extends AsyncTaskLoader<MailboxAccountLoader.R
|
||||||
cancelLoad();
|
cancelLoad();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void reset() {
|
public void reset() {
|
||||||
stopLoading();
|
stopLoading();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue