/** * 用户收è—�列表 * * @param type 0:全部收è—� 1:软件 2:è¯�题 3:å�šå®¢ 4:æ–°é—» 5:代ç � * @param pageIndex 页é�¢ç´¢å¼• 0表示第一é¡? * @return * @throws AppException */ public FavoriteList getFavoriteList(int type, int pageIndex, boolean isRefresh) throws AppException { FavoriteList list = null; String key = "favoritelist_" + loginUid + "_" + type + "_" + pageIndex + "_" + PAGE_SIZE; if (isNetworkConnected() && (!isReadDataCache(key) || isRefresh)) { try { list = ApiClient.getFavoriteList(this, loginUid, type, pageIndex, PAGE_SIZE); if (list != null && pageIndex == 0) { Notice notice = list.getNotice(); list.setNotice(null); list.setCacheKey(key); saveObject(list, key); list.setNotice(notice); } } catch (AppException e) { list = (FavoriteList) readObject(key); if (list == null) throw e; } } else { list = (FavoriteList) readObject(key); if (list == null) list = new FavoriteList(); } return list; }