public override void ClearState()
 {
     if (_type == MediaType.Anime)
     {
         _animeListFragmentInstance = null;
     }
     else if (_type == MediaType.Manga)
     {
         _mangaListFragmentInstance = null;
     }
 }
        public static MediaListFragment CreateMediaListFragment(int userId, MediaType type, MediaSort sort = null)
        {
            var frag   = new MediaListFragment();
            var bundle = new Bundle(6);

            bundle.PutString(MediaTypeKey, type.Value);
            bundle.PutInt(UserIdKey, userId);
            frag.Arguments = bundle;

            return(frag);
        }
        public override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            var typeString = Arguments.GetString(MediaTypeKey);

            _type   = AniListEnum.GetEnum <MediaType>(typeString);
            _userId = Arguments.GetInt(UserIdKey);

            if (_type == MediaType.Anime)
            {
                _animeListFragmentInstance = this;
            }
            else if (_type == MediaType.Manga)
            {
                _mangaListFragmentInstance = this;
            }

            _filterTextHandler ??= new Handler(UpdateFilterText);
            _filterModel = new MediaListFilterModel();
        }