refactor: add utils files

This commit is contained in:
sevichecc 2023-04-16 20:47:53 +08:00
parent 190b7a75af
commit b3140f1a0e
Signed by untrusted user who does not match committer: SevicheCC
GPG key ID: C577000000000000
4 changed files with 1 additions and 1 deletions

View file

@ -26,8 +26,8 @@ export default function BookmarkCommand() {
showToast(Toast.Style.Animated, "Loading bookmarks..."); showToast(Toast.Style.Animated, "Loading bookmarks...");
const newBookmarks = await apiServer.fetchBookmarks(); const newBookmarks = await apiServer.fetchBookmarks();
setBookmarks(newBookmarks); setBookmarks(newBookmarks);
cache.set("latest_bookmarks", JSON.stringify(newBookmarks));
showToast(Toast.Style.Success, "Bookmarked has been loaded"); showToast(Toast.Style.Success, "Bookmarked has been loaded");
cache.set("latest_bookmarks", JSON.stringify(newBookmarks));
} catch (error) { } catch (error) {
const requestErr = error as AkkomaError; const requestErr = error as AkkomaError;
showToast(Toast.Style.Failure, "Error", requestErr.message); showToast(Toast.Style.Failure, "Error", requestErr.message);