From 142b74cd9b05c718ad24b1b4fb0575ec8b94f92e Mon Sep 17 00:00:00 2001 From: erik Date: Tue, 28 May 2024 18:04:58 +0200 Subject: [PATCH] Refactor to to_html Currently keeping reply_mode as ref --- src/main/dda/masto_embed/app.cljs | 4 ++-- src/main/dda/masto_embed/reply_mode.cljs | 2 +- src/main/dda/masto_embed/{account_mode.cljs => to_html.cljs} | 4 ++-- .../masto_embed/{account_mode_test.cljs => to_html_test.cljs} | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) rename src/main/dda/masto_embed/{account_mode.cljs => to_html.cljs} (98%) rename src/test/dda/masto_embed/{account_mode_test.cljs => to_html_test.cljs} (97%) diff --git a/src/main/dda/masto_embed/app.cljs b/src/main/dda/masto_embed/app.cljs index 8ef969a..b76413e 100644 --- a/src/main/dda/masto_embed/app.cljs +++ b/src/main/dda/masto_embed/app.cljs @@ -17,7 +17,7 @@ (:require [dda.masto-embed.browser :as b] [dda.masto-embed.reply-mode :as rm] - [dda.masto-embed.account-mode :as am])) + [dda.masto-embed.to-html :as am])) (defn init [] (let [host-url (b/host-url-from-document) @@ -25,5 +25,5 @@ replies-to (b/replies-to-from-document) filter-favorited (b/filter-favorited-from-document)] (if (nil? replies-to) - (am/account-mode host-url account-name) + (am/to-html host-url account-name) (rm/replies-mode host-url account-name replies-to filter-favorited)))) \ No newline at end of file diff --git a/src/main/dda/masto_embed/reply_mode.cljs b/src/main/dda/masto_embed/reply_mode.cljs index 230253e..07b8bc4 100644 --- a/src/main/dda/masto_embed/reply_mode.cljs +++ b/src/main/dda/masto_embed/reply_mode.cljs @@ -22,7 +22,7 @@ [dda.masto-embed.api :as api] [dda.masto-embed.infra :as infra] [dda.masto-embed.browser :as b] - [dda.masto-embed.account-mode :as am] + [dda.masto-embed.to-html :as th] )) ; ToDo: Possibility to present replies to more than one post (defn mastocard->html [card media] diff --git a/src/main/dda/masto_embed/account_mode.cljs b/src/main/dda/masto_embed/to_html.cljs similarity index 98% rename from src/main/dda/masto_embed/account_mode.cljs rename to src/main/dda/masto_embed/to_html.cljs index 08787c6..bc596e7 100644 --- a/src/main/dda/masto_embed/account_mode.cljs +++ b/src/main/dda/masto_embed/to_html.cljs @@ -13,7 +13,7 @@ ; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ; See the License for the specific language governing permissions and ; limitations under the License. -(ns dda.masto-embed.account-mode +(ns dda.masto-embed.to-html (:require [cljs.core.async :refer [go chan !]] [cljs.core.async.interop :refer-macros [ diff --git a/src/test/dda/masto_embed/account_mode_test.cljs b/src/test/dda/masto_embed/to_html_test.cljs similarity index 97% rename from src/test/dda/masto_embed/account_mode_test.cljs rename to src/test/dda/masto_embed/to_html_test.cljs index 70cb8b0..0d87779 100644 --- a/src/test/dda/masto_embed/account_mode_test.cljs +++ b/src/test/dda/masto_embed/to_html_test.cljs @@ -14,10 +14,10 @@ ; See the License for the specific language governing permissions and ; limitations under the License. -(ns dda.masto-embed.account-mode-test +(ns dda.masto-embed.to-html-test (:require [cljs.test :refer (deftest is)] - [dda.masto-embed.account-mode :as sut] + [dda.masto-embed.to-html :as sut] [dda.masto-embed.data-helpers :as dh] [hickory.core :as h] [hickory.convert :as hc]