Skip to content

Commit

Permalink
修隨機挑本的bug(真 (#1379)
Browse files Browse the repository at this point in the history
* 完成雲端收藏隨機挑本功能

* 刪除debug用輸出

* 調整算法

* 完成本地收藏隨機挑本

* 刪除debug用輸出= =

* 詳細頁面常按選擇收藏資料夾

* fix bug

* 修bug(真)
  • Loading branch information
zhao-ng327 authored Aug 21, 2024
1 parent 7f89744 commit 5ab4fbe
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1677,7 +1677,8 @@ protected GalleryInfo doInBackground(Void... v) {

long gidDiff = firstGInfo.gid - lastGInfo.gid;
long block = gidDiff / 50;
List<GalleryInfo> rGInfoL = EhEngine.getAllFavorites(mOkHttpClient, url + "&next=" + (firstGInfo.gid - gidDiff / block * ((int) (Math.random() * block))) + 1).galleryInfoList;
long rBlock = ((int) (Math.random() * block)) + 1;
List<GalleryInfo> rGInfoL = EhEngine.getAllFavorites(mOkHttpClient, url + "&next=" + (firstGInfo.gid - gidDiff / block * ((int) (Math.random() * block)) + 1)).galleryInfoList;
return rGInfoL.get((int) (Math.random() * rGInfoL.size()));
} catch (Throwable e) {
throw new RuntimeException(e);
Expand Down

0 comments on commit 5ab4fbe

Please sign in to comment.