Loading src/org/dmfs/tasks/EditTaskFragment.java +3 −3 Original line number Diff line number Diff line Loading @@ -354,12 +354,12 @@ public class EditTaskFragment extends SupportFragment implements LoaderManager.L private void updateView() { /** /* * If the model loads very slowly then this function may be called after onDetach. In this case check if Activity is <code>null</code> and return if * <code>true</code>. * <code>true</code>. Also return if we don't have values or the values are still loading. */ Activity activity = getActivity(); if (activity == null) if (activity == null || mValues == null || mValues.isLoading()) { return; } Loading src/org/dmfs/tasks/model/ContentSet.java +18 −0 Original line number Diff line number Diff line Loading @@ -91,6 +91,11 @@ public final class ContentSet implements OnContentLoadedListener, Parcelable */ private Set<String> mAfterKeys; /** * Indicates that loading is in process. */ private boolean mLoading = false; /** * Private constructor that is used when creating a ContentSet form a parcel. Loading Loading @@ -131,6 +136,7 @@ public final class ContentSet implements OnContentLoadedListener, Parcelable String itemType = context.getContentResolver().getType(mUri); if (itemType != null && !itemType.startsWith(ContentResolver.CURSOR_DIR_BASE_TYPE)) { mLoading = true; new AsyncContentLoader(context, this, mapper).execute(mUri); } else Loading @@ -144,10 +150,22 @@ public final class ContentSet implements OnContentLoadedListener, Parcelable public void onContentLoaded(ContentValues values) { mBeforeContentValues = values; mLoading = false; notifyLoadedListeners(); } /** * Returns whether this {@link ContentSet} is currently loading values. * * @return <code>true</code> is an asynchronous loading operation is in progress, <code>false</code> otherwise. */ public boolean isLoading() { return mLoading; } /** * Delete this content. This ContentSet can no longer be used after this method has been called! * Loading Loading
src/org/dmfs/tasks/EditTaskFragment.java +3 −3 Original line number Diff line number Diff line Loading @@ -354,12 +354,12 @@ public class EditTaskFragment extends SupportFragment implements LoaderManager.L private void updateView() { /** /* * If the model loads very slowly then this function may be called after onDetach. In this case check if Activity is <code>null</code> and return if * <code>true</code>. * <code>true</code>. Also return if we don't have values or the values are still loading. */ Activity activity = getActivity(); if (activity == null) if (activity == null || mValues == null || mValues.isLoading()) { return; } Loading
src/org/dmfs/tasks/model/ContentSet.java +18 −0 Original line number Diff line number Diff line Loading @@ -91,6 +91,11 @@ public final class ContentSet implements OnContentLoadedListener, Parcelable */ private Set<String> mAfterKeys; /** * Indicates that loading is in process. */ private boolean mLoading = false; /** * Private constructor that is used when creating a ContentSet form a parcel. Loading Loading @@ -131,6 +136,7 @@ public final class ContentSet implements OnContentLoadedListener, Parcelable String itemType = context.getContentResolver().getType(mUri); if (itemType != null && !itemType.startsWith(ContentResolver.CURSOR_DIR_BASE_TYPE)) { mLoading = true; new AsyncContentLoader(context, this, mapper).execute(mUri); } else Loading @@ -144,10 +150,22 @@ public final class ContentSet implements OnContentLoadedListener, Parcelable public void onContentLoaded(ContentValues values) { mBeforeContentValues = values; mLoading = false; notifyLoadedListeners(); } /** * Returns whether this {@link ContentSet} is currently loading values. * * @return <code>true</code> is an asynchronous loading operation is in progress, <code>false</code> otherwise. */ public boolean isLoading() { return mLoading; } /** * Delete this content. This ContentSet can no longer be used after this method has been called! * Loading