Removed considerations of item ID and position from tag making method
This commit is contained in:
parent
17ad81d55e
commit
e1d858a06a
@ -38,7 +38,7 @@ public abstract class DialogFragmentController<T extends DialogFragment> {
|
||||
// Typically, we can't cast to a generic type. However, I've written non-generic code that
|
||||
// blindly casts the result to an arbitrary type that I expect is correct, so this is
|
||||
// pretty much the same thing.
|
||||
Log.d(TAG, "Finding dialog with tag " + tag);
|
||||
Log.d(TAG, "Finding dialog by tag " + tag);
|
||||
return (T) mFragmentManager.findFragmentByTag(tag);
|
||||
}
|
||||
}
|
||||
|
||||
@ -301,6 +301,6 @@ public abstract class BaseAlarmViewHolder extends BaseViewHolder<Alarm> {
|
||||
}
|
||||
|
||||
private String makeTag(@IdRes int viewId) {
|
||||
return FragmentTagUtils.makeTag(BaseAlarmViewHolder.class, viewId, getItemId());
|
||||
return FragmentTagUtils.makeTag(BaseAlarmViewHolder.class, viewId);
|
||||
}
|
||||
}
|
||||
|
||||
@ -198,6 +198,6 @@ public class TimerViewHolder extends BaseViewHolder<Timer> {
|
||||
}
|
||||
|
||||
private String makeTag(@IdRes int viewId) {
|
||||
return FragmentTagUtils.makeTag(TimerViewHolder.class, viewId, getItemId());
|
||||
return FragmentTagUtils.makeTag(TimerViewHolder.class, viewId);
|
||||
}
|
||||
}
|
||||
|
||||
@ -14,12 +14,5 @@ public final class FragmentTagUtils {
|
||||
return cls.getName() + ":" + viewId;
|
||||
}
|
||||
|
||||
/**
|
||||
* A version suitable for our ViewHolders.
|
||||
*/
|
||||
public static String makeTag(Class<?> cls, @IdRes int viewId, long itemId) {
|
||||
return makeTag(cls, viewId) + ":" + itemId;
|
||||
}
|
||||
|
||||
private FragmentTagUtils() {}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user