|
@@ -120,7 +120,7 @@ namespace GFGGame
|
|
|
{
|
|
|
base.AddEventListener();
|
|
|
|
|
|
- // EventAgent.AddEventListener(ConstMessage.GALLERY_DATA_CHANGE, UpdateGalleryList);
|
|
|
+ EventAgent.AddEventListener(ConstMessage.GALLERY_DATA_CHANGE, UpdateGalleryList);
|
|
|
// EventAgent.AddEventListener(ConstMessage.GALLERY_RANK_DATA_CHANGE, UpdateGalleryRankList);
|
|
|
}
|
|
|
protected override void OnShown()
|
|
@@ -340,7 +340,7 @@ namespace GFGGame
|
|
|
bool result = await PoemGallerySProxy.ReqGalleryList(_sortType, startIndex, _pageCount);
|
|
|
if (result)
|
|
|
{
|
|
|
- UpdateGalleryList();
|
|
|
+ Timers.inst.StartCoroutine(PoemGallerySProxy.Download(_galleryDatas));
|
|
|
}
|
|
|
}
|
|
|
private void UpdateGalleryList()
|
|
@@ -380,20 +380,6 @@ namespace GFGGame
|
|
|
UpdateView();
|
|
|
}
|
|
|
|
|
|
- // private void RefreshList()
|
|
|
- // {
|
|
|
- // if (_ui.m_comNormal.m_c1.selectedIndex == RecommendType.RANK)
|
|
|
- // {
|
|
|
- // _ui.m_comNormal.m_listRank.numItems = _galleryDatas.Count;
|
|
|
- // }
|
|
|
- // else
|
|
|
- // {
|
|
|
- // _list.numItems = _galleryDatas.Count;
|
|
|
- // _list1.numItems = _galleryDatas.Count;
|
|
|
- // }
|
|
|
- // UpdateView();
|
|
|
- // }
|
|
|
-
|
|
|
|
|
|
/********************************************************界面更新*************************************************/
|
|
|
private void UpdateView()
|
|
@@ -466,19 +452,19 @@ namespace GFGGame
|
|
|
long workId = _galleryDatas[index];
|
|
|
PoemGalleryData data = PoemGalleryDataManager.Instance.GetGalleryDataById(workId);
|
|
|
UI_ListRankItem item = UI_ListRankItem.Proxy(obj);
|
|
|
- // if (data.Ntexture == null)
|
|
|
- // {
|
|
|
- // Timers.inst.StartCoroutine(PictureStorageHelper.DownloadFile(data.PictureTempUrl, (Texture2D texture) =>
|
|
|
- // {
|
|
|
- // data.Ntexture = new NTexture(texture);
|
|
|
- // item.m_loaIcon.texture = data.Ntexture;
|
|
|
- // }));
|
|
|
- // }
|
|
|
- // else
|
|
|
- // {
|
|
|
- // item.m_loaIcon.texture = data.Ntexture;
|
|
|
- // }
|
|
|
- // item.m_loaIcon.height = item.m_loaIcon.width * item.m_loaIcon.texture.height / item.m_loaIcon.texture.width;
|
|
|
+ if (data.Ntexture == null)
|
|
|
+ {
|
|
|
+ Timers.inst.StartCoroutine(PictureStorageHelper.DownloadFile(data.PictureTempUrl, (Texture2D texture) =>
|
|
|
+ {
|
|
|
+ data.Ntexture = new NTexture(texture);
|
|
|
+ item.m_loaIcon.texture = data.Ntexture;
|
|
|
+ }));
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ item.m_loaIcon.texture = data.Ntexture;
|
|
|
+ }
|
|
|
+ item.m_loaIcon.height = item.m_loaIcon.width * item.m_loaIcon.texture.height / item.m_loaIcon.texture.width;
|
|
|
|
|
|
item.m_txtName.text = data.AuthorName;
|
|
|
item.m_btnCollect.title = data.CollectCount.ToString();
|