From f71fd65a8a7d613fbf6f42913f01bb9e38301dfd Mon Sep 17 00:00:00 2001 From: towards-a-new-leftypol Date: Tue, 5 Mar 2024 23:56:22 -0500 Subject: [PATCH] Move Thread Model into Common --- chandlr.cabal | 2 +- src/Common | 2 +- src/Component/Thread/Model.hs | 17 ----------------- src/Parsing/BodyParser.hs | 2 +- 4 files changed, 3 insertions(+), 20 deletions(-) delete mode 100644 src/Component/Thread/Model.hs diff --git a/chandlr.cabal b/chandlr.cabal index e9e18f2..08832a0 100644 --- a/chandlr.cabal +++ b/chandlr.cabal @@ -76,7 +76,7 @@ executable chandlr Common.Component.ThreadView Component.Thread.Files Component.Thread.Intro - Component.Thread.Model + Common.Component.Thread.Model Component.Thread.Embed Common.Component.BodyRender Common.FrontEnd.Routes diff --git a/src/Common b/src/Common index 5a41849..b027379 160000 --- a/src/Common +++ b/src/Common @@ -1 +1 @@ -Subproject commit 5a418494d53a23792a458f85d7aa397928786e3b +Subproject commit b027379d274c8f9b42ae161545bed368b9e800c3 diff --git a/src/Component/Thread/Model.hs b/src/Component/Thread/Model.hs deleted file mode 100644 index a0e5c49..0000000 --- a/src/Component/Thread/Model.hs +++ /dev/null @@ -1,17 +0,0 @@ -module Component.Thread.Model where - -import GHCJS.DOM.Types (JSString) -import Common.Network.SiteType (Site) -import Common.Network.PostType (Post) -import Parsing.PostPartType (PostPart) -import Data.Time.Clock (UTCTime) - -type PostWithBody = (Post, [ PostPart ]) - -data Model = Model - { site :: Site - , media_root :: JSString - , post_bodies :: [ PostWithBody ] - , current_time :: UTCTime - } deriving Eq - diff --git a/src/Parsing/BodyParser.hs b/src/Parsing/BodyParser.hs index ea5622a..1648013 100644 --- a/src/Parsing/BodyParser.hs +++ b/src/Parsing/BodyParser.hs @@ -30,7 +30,7 @@ import Data.Text (Text) import Miso (consoleLog) import Miso.String (fromMisoString) import qualified Common.Network.PostType as Post -import Component.Thread.Model (PostWithBody) +import Common.Component.Thread.Model (PostWithBody) import Parsing.PostPartType import Parsing.QuoteLinkParser