diff --git a/.gitmodules b/.gitmodules index b6c6947f..dcf383f7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ -[submodule "public/res/twemoji"] - path = public/res/twemoji +[submodule "deps/twemoji"] + path = deps/twemoji url = https://github.com/twitter/twemoji.git diff --git a/public/res/twemoji b/deps/twemoji similarity index 100% rename from public/res/twemoji rename to deps/twemoji diff --git a/src/util/twemojify.jsx b/src/util/twemojify.jsx index 505fdf2b..73a79571 100644 --- a/src/util/twemojify.jsx +++ b/src/util/twemojify.jsx @@ -8,11 +8,13 @@ import { sanitizeText } from './sanitize'; const Math = lazy(() => import('../app/atoms/math/Math')); -const CDN_LOCAL = "/public/res/twemoji/assets/" +const CDN_LOCAL = "/public/twemoji/assets/" const CDN_EXTERNAL = "https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/"; +var use_local = false; + export const GetTwemojiCDN = () => { - if(window.__TAURI__){ + if(window.__TAURI__ || use_local){ return CDN_LOCAL } else{ diff --git a/vite.config.js b/vite.config.js index b46913be..261408ec 100644 --- a/vite.config.js +++ b/vite.config.js @@ -20,6 +20,10 @@ const copyFiles = { { src: 'public/res/android', dest: 'public/', + }, + { + src: 'deps/twemoji/assets', + dest: 'public/twemoji' } ], }