mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-06-06 15:32:20 +00:00
simple welcome message (#152)
* simple welcome message * show welcome message only once * show onboarding progress
This commit is contained in:
committed by
GitHub
parent
7fa671f829
commit
20e7feb953
@@ -1,5 +1,6 @@
|
||||
module Simplex.Chat.Util where
|
||||
|
||||
import Control.Monad (when)
|
||||
import Data.ByteString.Char8 (ByteString)
|
||||
import Data.Text (Text)
|
||||
import Data.Text.Encoding (decodeUtf8With)
|
||||
@@ -12,5 +13,8 @@ safeDecodeUtf8 = decodeUtf8With onError
|
||||
ifM :: Monad m => m Bool -> m a -> m a -> m a
|
||||
ifM ba t f = ba >>= \b -> if b then t else f
|
||||
|
||||
whenM :: Monad m => m Bool -> m () -> m ()
|
||||
whenM ba a = ba >>= (`when` a)
|
||||
|
||||
unlessM :: Monad m => m Bool -> m () -> m ()
|
||||
unlessM b = ifM b $ pure ()
|
||||
|
||||
Reference in New Issue
Block a user