Skip to content
This repository has been archived by the owner on Jan 14, 2024. It is now read-only.

Commit

Permalink
[0.2.3] 修复百分比显示错误
Browse files Browse the repository at this point in the history
  • Loading branch information
AuroraZiling committed Aug 26, 2023
1 parent 60b023b commit 0ef8a55
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/modules/Core/GachaReport/Analysis/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,13 @@ def get_star_3_amount_to_string(self):

def get_star_5_percent_to_string(self):
if self.total_amount:
return f"{round(self.star_5_amount / self.total_amount, 2)}%"
return f"{round(self.star_5_amount / self.total_amount * 100, 2)}%"
else:
return "0.00%"

def get_star_4_percent_to_string(self):
if self.total_amount:
return f"{round(self.star_4_amount / self.total_amount, 2)}%"
return f"{round(self.star_4_amount / self.total_amount * 100, 2)}%"
else:
return "0.00%"

Expand Down
5 changes: 3 additions & 2 deletions src/modules/Views/settings_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,13 +293,14 @@ def isNeedUpdateThreadStatusChanged(self, status, content):
InfoBar.error("错误", content, InfoBarPosition.TOP_RIGHT, parent=self)
elif status == 0:
self.newVersion = content
self.isNeedUpdateThreadStateTooltip.setState(True)
self.isNeedUpdateThreadStateTooltip = None
w = ComboboxDialog("更新", f"发现新版本: {self.newVersion['tag_name']}\n是否更新?",
["Coding Artifact (国内推荐)", "Github Release (国外推荐)"], self)
w.returnSignal.connect(self.__updateReturnSignal)
w.exec()

self.isNeedUpdateThreadStateTooltip.setState(True)
self.isNeedUpdateThreadStateTooltip = None

def __updateCheckCardClicked(self):
self.updateCheckCard.setEnabled(False)
self.isNeedUpdateThread = IsNeedUpdateThread(utils.app_version)
Expand Down
2 changes: 1 addition & 1 deletion src/modules/constant.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
APP_VERSION = "0.2.2"
APP_VERSION = "0.2.3"
UI_VERSION = "0.9.0"

SRGF_GACHATYPE = {"2": "2", "1": "1", "11": "11", "12": "12"}
Expand Down

0 comments on commit 0ef8a55

Please sign in to comment.