From 1dc0069cdc6490a26a9071318faf62175ce49328 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Thu, 19 Oct 2023 20:02:31 +0800 Subject: [PATCH] More descriptive toasts copy --- src/components/status.jsx | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/src/components/status.jsx b/src/components/status.jsx index 9eb846e9..bf61f66f 100644 --- a/src/components/status.jsx +++ b/src/components/status.jsx @@ -579,7 +579,11 @@ function Status({ try { const done = await confirmBoostStatus(); if (!isSizeLarge && done) { - showToast(reblogged ? 'Unboosted' : 'Boosted'); + showToast( + reblogged + ? `Unboosted @${username || acct}'s post` + : `Boosted @${username || acct}'s post`, + ); } } catch (e) {} }} @@ -597,7 +601,11 @@ function Status({ try { favouriteStatus(); if (!isSizeLarge) { - showToast(favourited ? 'Unfavourited' : 'Favourited'); + showToast( + favourited + ? `Unfavourited @${username || acct}'s post` + : `Favourited @${username || acct}'s post`, + ); } } catch (e) {} }} @@ -621,7 +629,11 @@ function Status({ try { bookmarkStatus(); if (!isSizeLarge) { - showToast(bookmarked ? 'Unbookmarked' : 'Bookmarked'); + showToast( + bookmarked + ? `Unbookmarked @${username || acct}'s post` + : `Bookmarked @${username || acct}'s post`, + ); } } catch (e) {} }} @@ -829,7 +841,11 @@ function Status({ try { favouriteStatus(); if (!isSizeLarge) { - showToast(favourited ? 'Unfavourited' : 'Favourited'); + showToast( + favourited + ? `Unfavourited @${username || acct}'s post` + : `Favourited @${username || acct}'s post`, + ); } } catch (e) {} }, @@ -843,7 +859,11 @@ function Status({ try { bookmarkStatus(); if (!isSizeLarge) { - showToast(bookmarked ? 'Unbookmarked' : 'Bookmarked'); + showToast( + bookmarked + ? `Unbookmarked @${username || acct}'s post` + : `Bookmarked @${username || acct}'s post`, + ); } } catch (e) {} }, @@ -858,7 +878,11 @@ function Status({ try { const done = await confirmBoostStatus(); if (!isSizeLarge && done) { - showToast(reblogged ? 'Unboosted' : 'Boosted'); + showToast( + reblogged + ? `Unboosted @${username || acct}'s post` + : `Boosted @${username || acct}'s post`, + ); } } catch (e) {} })();