Skip to content

Commit

Permalink
except get_latest_version
Browse files Browse the repository at this point in the history
  • Loading branch information
honjow committed Jun 27, 2024
1 parent 7e085da commit 32bb365
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
13 changes: 11 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,13 +217,22 @@ async def fix_gpuFreqSlider(self):

async def update_latest(self):
logging.info("Updating latest")
return update.update_latest()
# return update.update_latest()
try:
return update.update_latest()
except Exception as e:
logging.error(e, exc_info=True)
return False

async def get_version(self):
return update.get_version()

async def get_latest_version(self):
return update.get_latest_version()
try:
return update.get_latest_version()
except Exception as e:
logging.error(e, exc_info=True)
return ""

async def get_ryzenadj_info(self):
return cpuManager.get_ryzenadj_info()
Expand Down
11 changes: 8 additions & 3 deletions src/components/more.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,14 @@ export const MoreComponent: VFC = () => {

useEffect(() => {
const getData = async () => {
const latestVersion = await Backend.getLatestVersion();
setLatestVersion(latestVersion);
// Settings.latestVersion = latestVersion;
// const latestVersion = await Backend.getLatestVersion();
// setLatestVersion(latestVersion);
setTimeout(() => {
setLatestVersion(latestVersion);
Backend.getLatestVersion().then((latestVersion) => {
setLatestVersion(latestVersion);
})
}, 3000);
};
getData();
});
Expand Down

0 comments on commit 32bb365

Please sign in to comment.