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

Commit

Permalink
Hide the Translate Post button if no translation API endpoint has bee…
Browse files Browse the repository at this point in the history
…n defined
  • Loading branch information
aaga committed Oct 5, 2023
1 parent 1244fdf commit 29a032f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion composables/masto/translate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export function useTranslation(status: mastodon.v1.Status | mastodon.v1.StatusEd
&& supportedTranslationCodes.includes(to as any)
&& supportedTranslationCodes.includes(status.language as any)
&& !userSettings.value.disabledTranslationLanguages.includes(status.language)
const enabled = /*! !useRuntimeConfig().public.translateApi && */ shouldTranslate
const enabled = !!useRuntimeConfig().public.translateApi && shouldTranslate

async function toggle() {
if (!shouldTranslate)
Expand Down

0 comments on commit 29a032f

Please sign in to comment.