|
@@ -228,14 +228,22 @@ namespace GFGGame
|
|
|
private void OnBtnRecoverClick()
|
|
|
{
|
|
|
|
|
|
- if (_tabIndex == TabType.RECOVER && _ui.m_comNormal.m_c1.selectedIndex == RecommendType.RECOMMEND)//当前在推荐页要刷新
|
|
|
+ if (_tabIndex == TabType.RECOVER)//当前在推荐页要刷新
|
|
|
{
|
|
|
- PullDown();
|
|
|
- onPullDownRelease();
|
|
|
+ if (_ui.m_comNormal.m_c1.selectedIndex == RecommendType.RECOMMEND)//重新拉取数据
|
|
|
+ {
|
|
|
+ PullDown();
|
|
|
+ onPullDownRelease();
|
|
|
+ }
|
|
|
+ else//切页签并重新拉取数据
|
|
|
+ {
|
|
|
+ _ui.m_comNormal.m_c1.selectedIndex = RecommendType.RECOMMEND;
|
|
|
+ }
|
|
|
}
|
|
|
- else//当前不在推荐页只把页签切回到推荐页,不刷新
|
|
|
+ else//更新列表
|
|
|
{
|
|
|
- _ui.m_comNormal.m_c1.selectedIndex = RecommendType.RECOMMEND;
|
|
|
+ UpdateList();
|
|
|
+ UpdateGalleryList();
|
|
|
}
|
|
|
_tabIndex = _ui.m_c1.selectedIndex;
|
|
|
_subtabIndex = _ui.m_comNormal.m_c1.selectedIndex;
|
|
@@ -282,27 +290,7 @@ namespace GFGGame
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- if (_ui.m_comNormal.m_c1.selectedIndex == RecommendType.RECOMMEND)//首页
|
|
|
- {
|
|
|
- _ui.m_comNormal.m_comScroll.target.scrollPane.header.visible = true;
|
|
|
- if (_ui.m_comNormal.m_comBoBox.selectedIndex == 0)//推荐
|
|
|
- {
|
|
|
- _sortType = (int)GallerySortType.Recommend;
|
|
|
- _galleryDatas = PoemGalleryDataManager.Instance.RecommendDatas;
|
|
|
- }
|
|
|
- else//最新
|
|
|
- {
|
|
|
- _sortType = (int)GallerySortType.Newest;
|
|
|
- _galleryDatas = PoemGalleryDataManager.Instance.NewestDatas;
|
|
|
- }
|
|
|
- }
|
|
|
- else if (_ui.m_comNormal.m_c1.selectedIndex == RecommendType.FRIEND)//好友
|
|
|
- {
|
|
|
- _sortType = (int)GallerySortType.Friend;
|
|
|
- _galleryDatas = PoemGalleryDataManager.Instance.FrinedDatas;
|
|
|
- }
|
|
|
- _list = _ui.m_comNormal.m_comScroll.m_listRecommend;
|
|
|
- _list1 = _ui.m_comNormal.m_comScroll.m_listRecommend1;
|
|
|
+ UpdateList();
|
|
|
if (_list.numItems > 0) _list.ScrollToView(0);
|
|
|
if (_list1.numItems > 0) _list.ScrollToView(0);
|
|
|
|
|
@@ -310,6 +298,30 @@ namespace GFGGame
|
|
|
}
|
|
|
|
|
|
}
|
|
|
+ private void UpdateList()
|
|
|
+ {
|
|
|
+ if (_ui.m_comNormal.m_c1.selectedIndex == RecommendType.RECOMMEND)//首页
|
|
|
+ {
|
|
|
+ _ui.m_comNormal.m_comScroll.target.scrollPane.header.visible = true;
|
|
|
+ if (_ui.m_comNormal.m_comBoBox.selectedIndex == 0)//推荐
|
|
|
+ {
|
|
|
+ _sortType = (int)GallerySortType.Recommend;
|
|
|
+ _galleryDatas = PoemGalleryDataManager.Instance.RecommendDatas;
|
|
|
+ }
|
|
|
+ else//最新
|
|
|
+ {
|
|
|
+ _sortType = (int)GallerySortType.Newest;
|
|
|
+ _galleryDatas = PoemGalleryDataManager.Instance.NewestDatas;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else if (_ui.m_comNormal.m_c1.selectedIndex == RecommendType.FRIEND)//好友
|
|
|
+ {
|
|
|
+ _sortType = (int)GallerySortType.Friend;
|
|
|
+ _galleryDatas = PoemGalleryDataManager.Instance.FrinedDatas;
|
|
|
+ }
|
|
|
+ _list = _ui.m_comNormal.m_comScroll.m_listRecommend;
|
|
|
+ _list1 = _ui.m_comNormal.m_comScroll.m_listRecommend1;
|
|
|
+ }
|
|
|
/// <summary>
|
|
|
/// 切换收藏页签
|
|
|
/// </summary>
|