Move Network.PostType to Common
This commit is contained in:
parent
ceebf6df60
commit
9588a24cb3
|
@ -71,7 +71,7 @@ executable chandlr
|
|||
Common.Network.CatalogPostType
|
||||
Network.BoardType
|
||||
Network.SiteType
|
||||
Network.PostType
|
||||
Common.Network.PostType
|
||||
Network.ThreadType
|
||||
Common.Component.ThreadView
|
||||
Component.Thread.Files
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit cbc894bcd57f6c693c0bf62df4e52fdbf076e840
|
||||
Subproject commit a97152853d42a4d334d6ab659f9a38792d648cda
|
|
@ -20,8 +20,8 @@ import Data.Maybe (fromJust)
|
|||
import Data.Text (unpack)
|
||||
import Data.JSString (JSString, pack)
|
||||
|
||||
import qualified Network.PostType as Post
|
||||
import Network.PostType (Post)
|
||||
import qualified Common.Network.PostType as Post
|
||||
import Common.Network.PostType (Post)
|
||||
import Parsing.EmbedParser (extractVideoId)
|
||||
|
||||
embed :: Post -> View a
|
||||
|
|
|
@ -32,8 +32,8 @@ import Network.SiteType (Site)
|
|||
import qualified Network.SiteType as Site
|
||||
import qualified Network.BoardType as Board
|
||||
import qualified Network.ThreadType as Thread
|
||||
import qualified Network.PostType as Post
|
||||
import Network.PostType (Post)
|
||||
import qualified Common.Network.PostType as Post
|
||||
import Common.Network.PostType (Post)
|
||||
import Common.AttachmentType (Attachment, Dimension (..))
|
||||
import qualified Common.AttachmentType as Attachment
|
||||
import Network.Units (bytesToHumanReadable)
|
||||
|
|
|
@ -22,8 +22,8 @@ import Miso.String (toMisoString)
|
|||
import Data.Time.Clock (UTCTime, diffUTCTime)
|
||||
import Data.Time.Format (formatTime, defaultTimeLocale)
|
||||
|
||||
import Network.PostType (Post)
|
||||
import qualified Network.PostType as Post
|
||||
import Common.Network.PostType (Post)
|
||||
import qualified Common.Network.PostType as Post
|
||||
import Network.SiteType (Site)
|
||||
import qualified Network.SiteType as Site
|
||||
import Network.BoardType (Board)
|
||||
|
|
|
@ -2,7 +2,7 @@ module Component.Thread.Model where
|
|||
|
||||
import GHCJS.DOM.Types (JSString)
|
||||
import Network.SiteType (Site)
|
||||
import Network.PostType (Post)
|
||||
import Common.Network.PostType (Post)
|
||||
import Parsing.PostPartType (PostPart)
|
||||
import Data.Time.Clock (UTCTime)
|
||||
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE DeriveAnyClass #-}
|
||||
|
||||
module Network.PostType where
|
||||
|
||||
import GHC.Generics
|
||||
import Data.Text (Text)
|
||||
import Data.Time.Clock (UTCTime)
|
||||
import Data.Aeson (FromJSON, ToJSON)
|
||||
import Common.AttachmentType (Attachment)
|
||||
|
||||
data Post = Post
|
||||
{ post_id :: Integer
|
||||
, board_post_id :: Integer
|
||||
, creation_time :: UTCTime
|
||||
, body :: Maybe Text
|
||||
, subject :: Maybe Text
|
||||
, name :: Maybe Text
|
||||
, email :: Maybe Text
|
||||
, body_search_index :: Text
|
||||
, thread_id :: Integer
|
||||
, embed :: Maybe Text
|
||||
, attachments :: [ Attachment ]
|
||||
} deriving (Show, Generic, FromJSON, ToJSON, Eq)
|
||||
|
|
@ -6,7 +6,7 @@ module Network.ThreadType where
|
|||
import GHC.Generics
|
||||
import Data.Time.Clock (UTCTime)
|
||||
import Data.Aeson (FromJSON, ToJSON)
|
||||
import Network.PostType (Post)
|
||||
import Common.Network.PostType (Post)
|
||||
|
||||
data Thread = Thread
|
||||
{ thread_id :: Integer
|
||||
|
|
|
@ -29,7 +29,7 @@ import GHCJS.DOM.JSFFI.Generated.DOMTokenList (contains)
|
|||
import Data.Text (Text)
|
||||
import Miso (consoleLog)
|
||||
import Miso.String (fromMisoString)
|
||||
import qualified Network.PostType as Post
|
||||
import qualified Common.Network.PostType as Post
|
||||
import Component.Thread.Model (PostWithBody)
|
||||
|
||||
import Parsing.PostPartType
|
||||
|
|
Loading…
Reference in New Issue